Dear expert:
Just referenced your AN4856 about SENT driver for 5744. I tried to migrate the example project to S32DS, but there is compile error.
One more doubt, do you suggest to enable the FastMsgFiFo and Crc when using this driver?
Solved! Go to Solution.
Hi @ChenBowen
__interrupt attribute is not supported here. It should inform the compiler to create a prologue and epilogue for interrupt function and also it should put se_rfi instruction at the end of the function. If you want to use hardware interrupt mode, here's an example how to do that (it's little bit complicated):
To read/write MSR or SPR in general, you can follow:
To access MSR[EE] bit, you can use: __asm__(" wrteei 1");
I would use DMA and FIFO to offload the CPU.
Regards,
Lukas
Hi @ChenBowen
__interrupt attribute is not supported here. It should inform the compiler to create a prologue and epilogue for interrupt function and also it should put se_rfi instruction at the end of the function. If you want to use hardware interrupt mode, here's an example how to do that (it's little bit complicated):
To read/write MSR or SPR in general, you can follow:
To access MSR[EE] bit, you can use: __asm__(" wrteei 1");
I would use DMA and FIFO to offload the CPU.
Regards,
Lukas
Thank you! I choose the sw interrupt mode, that problem is solved.
However, I don't know assembly languageI, still don't know how to modify the following code.
Is my modification right? I remove the "asm".
Moreover, How to modify this function? Could you please help me modify it
as I I have no knowledge of assembly language.
Excuse me,I want to know how do you set the sw interrupt mode?
Thank you!
Regarding Suspend:
And regarding Restore, you can simply use C code like this:
if(Msr&0x8000) /* Check what was original value of MSR[EE] and write it to MSR[EE] using wrteei instruction*/
__asm__("wrteei 1")
else
__asm__("wrteei 0")
Regards
Lukas
Here comes another problem... Can I just add "static" before the "inline void" ?
Hello,can I ask if the compilation problems have been resolved?
If yes,can I have some communication with you? Because I met the same issue.
Thanks!