nuttx/boards/arm/samv7/common/scripts
Michal Lenc ef469bac7f samv7: ensure the correct location of message RAM
The message RAM does not behave correctly if lower 16 bits of
buffer address overflow (upper 16 bits are set once in matrix driver
for the entire CAN driver). For example message RAM starting at
0x2040fc20 would not work for buffers that go beyond 0x20410000 and
MCAN would sent data located at 0x20400000 to the network. The same
issue would occur even if TX buffers would start directly at 0x20410000.
The upper 16 bits would still have 0x2040 value because of RX buffers
located in 0x2040ffff range.

This commit ensures the RAM is always located at the beginning of
the data section and thus the overflow mentioned above should never occur.
The alternative would be to use larger alignment, but the message RAM
can have up to 4352 words and this would cause a significant padding.

The RAM is also initialized to zero to ensure valid parity/ECC checksums.
The address issue is not described anywhere in the manual, so it is
possible this is caused by some incorrect configuration, but the context
of the registers looks valid.

This commit also fixes the compilation errors when the driver is run
without data cache.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-02-10 15:43:54 -03:00
..
flash.ld.template samv7: ensure the correct location of message RAM 2025-02-10 15:43:54 -03:00
kernel-space.ld samv7: ensure the correct location of message RAM 2025-02-10 15:43:54 -03:00
memory.ld.template boards/arm/samv7: migrate to SPDX identifier 2024-11-10 01:12:34 +08:00
user-space.ld boards/arm/samv7: migrate to SPDX identifier 2024-11-10 01:12:34 +08:00