we've been having issue with can where sometimes our data or stack gets overwritten and hard faults. we found that the mcan is locked to sram base 0x02000000. if we try to change the MRBA to any other location the mcan module stops working. we've had to reserve the first 4 pages for the mcan to get it to not override our stack. is the mcan modules just permanently set to that location?
we created a buffer for the can and we set the offset to it, but it duplicates the data to the first 4 pages of 0x20000000(meant this addr from the first question). when we try moving it to 0x20010000 the can module transmit just zeros for the id and data and no longer receives. the only thing that has worked was reserving the first 4 pages of 0x20000000 and placing the can buffer there.
Hello @jmorel
Yes, this memory cannot be used as CAN RAM. It is allocated for USB RAM.
Due to the alignment constraint (64KB-aligned), only the address starting from 0x20000000 can be used as CAN RAM.
BR
Alice