Hello everyone,
I need your support with my project using the LPC55S06-EVK.
I'm currently working on SPI communication with the FRDM-STBC-AGM01 sensor and i'm struggling on using it in interrupt mode. I state that I've been able to communicate with the sensor in polling mode and the hardware setup isn't changed since that condition.
The main problem is that i can't get the interrupt to be fired again when i finish to send my data to the SPI, regardless which kind of watermark i choose.
Code below:
When in debug mode, i can see the code jumping from the main to the FLEXCOMM8_FLEXCOMM_IRQHANDLER just after the SPI_EnableInterrupts(FLEXCOMM8...) and than moving again into the if (machine_state) but at the GPIO_PinWrite(GPIO, BOARD_INITPINS_CS_MANUAL_PORT, BOARD_INITPINS_CS_MANUAL_PIN, 0);
it goes and get stuck into the callback function.
There is also a function to clear the interrupt registers?
And the secondary issue that i'm facing is that i can't get the "auto SSL" working even if routed using the configurator. It would be great to have the code managing the CS itself.
Thanks in advance for your support, have a great day.
Hello @Am-Dev
1) About SPI interrupt, how about firstly test the spi_interrupt demo under SDK? Whether it can work well on your side.
2)" It would be great to have the code managing the CS itself. "
->>If you want to use code control slave select, You can use a simple GPIO to control.
BR
Alice