Hi team,
I encountered some problems when testing SPD.
As long as I use DMA and SPD modules at the same time, the program will enter hardfault.
The strange thing is that I didn't even include these drivers, but I still encountered such errors.
Attached is the test project, which is actually the routine in S32 DS (S32 DS V3.5 + RTD 5.0.0+SPD 1.0.5), adding SPD components and DMA.
thanks for you help always.
BR,jim.
Hi @cuongnguyenphu
one more finding:
RTD Port example enables MPU in the startup, when you disable MPU, the bus fault is not happening.
This is instruction causing the issue:
as you can see it resides in MPU Region 6 where I don't see any issue with that.
If I do write into the address 0x2040938 via Lauterbach it's not a problem.
Anyway disabling MPU helped, so not sure what's going on now.
I'm leaving for vacation today so I can't support until 1st August.
Kind Regards,
Radoslav
Hi@ @cuongnguyenphu
Thanks for your help, is there any way we can avoid this problem or how to explain it to customers? Or is this a bug?
Hi @cuongnguyenphu ,
when adding the SAF drivers, I'd add correctly SAF mem sections into linker file (not relying on default placement) and maybe examine size of regions if there is enough reserve.
I can now confirm just the fact that original SIUL2 example + SAF does work, but + DMA doesn't.
Kind Regards,
Radoslav
Hi @RadoslavB ,
I see the hardfault happend when I add eMCEM and SafetyBase to our working project, even we doesn't call any APIs from it SPD APIs.
When deeper investigate, I see it raised a Bus fault error when trying to access 0x20430938.
I'm wonder did I missed any steps when include eMCEM and SafetyBase module?
Below is my debugging screenshot and .map file
1. Add eMCeM and SafetyBase:
2. SBC->BFAR:
3. Program counter when Hardfault:
4. Map file:
Hi @Senlent
Yes I can reporduce the issue at my side. it jumped to hardfault when trying to access exclusive area.
It seems that when adding SPD/DMA, there're memory protection of the address exclusive area
Hi@ cuongnguyenphu
Thank you very much for your help, could you please let me know if you can reproduce the problem?
Hi @Senlent
Let me check this issue and feedback to you soon