Tool/software: Code Composer Studio
Dear forum,
recently I am working on project, in which I have to implement SPI interrupt triggered by writing to SPIBTX (16 bit value for my ADAC). I followed steps from Motorware HAL tutorial (because I have to use HAL in my project). From point 6.7, which is about UART interrupt I followed steps for implementing my SPI interrupt. So I did as follows:
1. Added spi.c and spi.h to my project.
2. Edited HAL_Obj.h
3. Initialized SPI handles in hal.c
4. Prototyped and defined HAL_setupSpiB() init functions.
5. Called setup functions, enabled peripheral clocks (also changed GPIO's).
6. Added SPI interrupt enable "extern void HAL_enableSpiInts()"
7. I wanted my interrupt to be triggered by writing something in TX buffer, so I added int service in PIE table (group 6 is for SPI interrupts).
8. Added next few commands.
My code for interrupt looks like this:
The problem is that the interrupt won't be triggered by itself. I wanted it to be looped - by writing once dummy byte to TX buffer interrupt should be looped, but all i can see are static responses. What am I doing wrong?










