vrmay23 commented on code in PR #18300:
URL: https://github.com/apache/nuttx/pull/18300#discussion_r2759920701


##########
arch/arm/src/stm32h7/stm32_fdcan_sock.c:
##########
@@ -2066,6 +2065,10 @@ int fdcan_initialize(struct fdcan_driver_s *priv)
 
   fdcan_setconfig(priv->base, 1);
 
+  /* Clear Message RAM */
+
+  memset((void *)STM32_CANRAM_BASE, 0, 2560 * 4);

Review Comment:
   Yes, it is necessary. Message RAM is not cleared by hardware reset. Without
   initialization, filters and FIFO headers may contain garbage data, causing
   silent frame loss or spurious interrupts. This was observed in practice on
   Nucleo-H753ZI before this fix.
   
   Regarding the "Magic numbers" I totally agree!! 
   I Will replace with proper defines. Will update in next push. Basically it 
canes from ST ddefinition (total words in RAM).
   
   I'll try to update it today!
   
   Thank you for feedback :)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to