SPI iLLD _interrupt trap

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

Hello forum,

I am trying to use TC3xx starter kit to perform SPI communication between two SPI  modules of the board one as a Master and one as a Slave actually i am able to initialize both modules but i always get into interrupt trap when i try to send or receive data ! 

The program works fine until I call the function "IfxQspi_SpiMaster_exchange(...)" for sending SPI messages. Now the controller moves to a trap because of invalid memory access.

Seems to be also not working with our board when using the ILLD example SPI_CPU.

i would appreciate any help about this 

Thanks in advance 

0 Likes
6 Replies
Nambi
Moderator
Moderator
Moderator
50 likes received 5 likes given 100 solutions authored

Hi,

We tested the example SPI_CPU_1_KIT_TC375_LK using ADS on KIT_A2G_TC375_LITE and found that it works without any issue.

Could you let us know the environment(ADS or any other ecosystem) used, the name of the TC3xx starter kit used, and the name of the trap handler encountered at your end?

Best Regards.

0 Likes
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

Hallo, 

Thanks for the reply. I am using Aurix TC3xx Starter kit and I am using a UDE debugger for flashing and debugging. The handler I am being trapped at is isr_undef_handler(void), given that I have no defined interrupt vector.

Thanks in advance.

Best Regards,

Mohamed  

0 Likes
Nambi
Moderator
Moderator
Moderator
50 likes received 5 likes given 100 solutions authored

Hi Mohamed,

Since you have the starter kit, we recommend you successfully test the existing ILLD example before proceeding with customization. You can follow the below steps.
a) TC3xx Starter kit is very generic. Identify the exact kit available at your end. E.g., KIT_A2G_TC375_LITE was used for testing at our end.
b) Identify the ILLD example compatible with your kit. e.g., SPI_CPU_1_KIT_TC375_LK was used at our end. "LK" in the example name stands for Lite kit.
c) In the Cpu0_Main.c of the example, you will find the user guide for the example on the kit in the comments section. You can follow this to test the example.
e.g., https://www.infineon.com/aurix-expert-training/Infineon-AURIX_SPI_CPU_1_KIT_TC375_LK-TR-v01_00_01-EN... is the user-guide related to example SPI_CPU_1
for KIT_AURIX_TC375_LK
d) You can let us know the details about your steps a) to c)  and observations of the test.

Best Regards,
Nambi.

0 Likes
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

Hallo Nambi,

Thanks for your reply again, about a) I have a TC357 ADAS starter kit V2.0, b) I checked the port definition in the example SPI_CPU_1_KIT_TC397_TFT with aurix TC357 and they have the same port configuration, c) I tried to the example with the led checking function but I still get trapped in IfxCpu_Trap_busError. I would really appreciate if you can give me any hints about this. Thanks in advance. 

Best Regards,

Mohamed 

0 Likes
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

Hallo,

Any Help would be really appreciated. 

0 Likes
Nambi
Moderator
Moderator
Moderator
50 likes received 5 likes given 100 solutions authored

Hi Mohamed,

you can check the below items.

1. Based on the recent details, I think you are using the below kit. You can confirm
https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc357ta_3v3_trb/

2. In MyICP, we have demo software TriBoard_TC35X_V1.2.0.zip corresponding to the Triboard. I am not sure if you are using this as a base. Can you use this as a base and modify the code on top of this?

3. You can start with the adaptation of Blinky_LED_1_TC397 from the ILLD project to ensure that basic functionalities are working on the board. Would you please check the LED ports available on your triboard using the user manual in https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc357ta_3v3_trb/(LED port would be different for your triboard compared to the TC397_TFT example)

4. On completing point 3,  you can try adapting  SPI_CPU_1_KIT_TC397_TFT and follow the instructions from https://www.infineon.com/aurix-expert-training/Infineon-AURIX_SPI_CPU_1_KIT_TC397_TFT-TR-v01_00_01-E.... You can check and connect the Master and Slave pins externally as available on your Triboard. The connector will be different from the TC397_TFT kit. During your debug, could you please step into(not step over) each instruction to find the exact instruction or line of code that leads to the issue in a function?

Best Regards,
Nambi.

0 Likes