hi, developers!
i use the dtcm as the stack on AutosarOs Task. but i meet the hardfault(Unaligned access UsageFault). i find the SystemInit() is enable the mpu. but the Privileged Access seems problems.
i change the rasr[4] value, from 0x01040021UL to 0x03080021UL(refrence to RTD 4.7.0, SW Version 4.0.0), it's work no hardfault. but peripheral(such as: CAN, UART) is not work. it can't send message.
i use the RTD AUTOSAR 4.4, SW Version 1.0.0.
by the way, i add the section(itcm0_code, dtcm0_data) for use the TCM.
this problem block me, hoping to get help.
Attachted the .ld file and MPU code.
reference link:
https://community.nxp.com/t5/S32K/How-to-use-DTCM-1-memory-in-S32K314-controllers/m-p/1663024
thanks®ards,
Ags
and, i change the memory .ld file and add the section, as follow;
update the issue:
i use the boot(start Address:0x0040 0000) + app(start Address:0x0050 0000) projiect. In order to test mpu configuration, i change the app start address from 0x0050 0000 to 0x0040 0000. i find the interrupt not work.
I use the lasted git code and also changed the start address of the application. the interrupt also not work.
so maybe boot cause problems?
Hi @Ags
Does the MPU configuration correspond to your current linker file? It sounds like there's some mismatch.
Regards,
Lukas
hi, @lukaszadrapa
thanks your response.
RTD1.0.0 is the file I am currently testing. I modified the MPU configuration in system.c and the linker script file (ld) based on RTD3.0.0. When the origin(int_flash) in the ld file is set to 0x00400000, the peripherals do not seem to work. However, when I change origin(int_flash) to 0x00500000 and program the BOOT, the system works normally. The DTCM also functions correctly.
thanks®ards
Ags
Hi @Ags
you wrote "the peripherals do not seem to work" - I think it would be worth investigating a bit more to find the root cause. What does not work exactly? Are the peripherals initialized as expected? Does it get stuck somewhere?
Regards,
Lukas
hi, @lukaszadrapa
yes,all the peripherals is initialized. none of the source files have changed.
I only changed the flash start address and length of the link file. the periphaerals(can, uart, lin) is not work.
thanks®ards
zags