How to generate UART RX INTERRUPT WITH SPC58EC-DISP
Hello All,
I am working on UART on SPC58EC-disp Discovery board importing and using example source code "SPC58ECxx_RLA SERIAL DMA Test Application for Discovery" in SPC5Studio.
I can transmit the data but unable to receive the data by interrupt method to avoid blocking.
In the original project, I have only changed, in the main.c file, the two highlighted row as follow:
#include "components.h"
#include "serial_lld_cfg.h"
void sddmatxcb(SerialDriver *sdp) {
(void)sdp;
pal_lld_togglepad(PORT_F, PF_LED1);
}
void sddmarxcb(SerialDriver *sdp) {
(void)sdp;
pal_lld_togglepad(PORT_F, PF_LED2);
}
int main(void) {
uint8_t message[]= "Hello World!\r\n";
/* Enable Interrupts */
irqIsrEnable();
sd_lld_start(&SD1, &serial_config_sddmacfg);
/* Application main loop.*/
for ( ; ; ) {
(void)sd_lld_write(&SD1,message,(uint16_t)(sizeof(message)/sizeof(message[0])));
osalThreadDelayMilliseconds(1500);
//pal_lld_togglepad(PORT_F, PF_LED2);
}
}
Doing Debug firmware with UDE STK 5.0, and putting a breakpoint in "sddmarxcb" callback function, i observe that never entry in this function. Please guide me with Rx interrupt initialization so that I can receive the data without blocking.
Thank You,
Orazio

