I am attempting to use an interrupt to service data received from ASC1. I cannot find information on setting the ASCx_RIC register in the Infineon manuals. I have found some examples that use values of 0x0071 or 0x0044 but these may not be correct for my application.
Currently I am able to trip an interrupt when I transmit data, but the serial data is not being passed to the isr. The isr works when called from a loop using getchar, but I would like to use an interrupt. I am using this method on a PIC processor, but have been unable to make it work using the XC167.
// Code to setup ASC1 void serial_init_1(int RValue) // Radio Header { P3 |= 0x0001; // SET PORT 3.0 OUTPUT LATCH (TXD) DP3 |= 0x0001; // SET PORT 3.0 DIRECTION CONTROL (TXD OUTPUT) DP3 &= 0xFFFD; // RESET PORT 3.1 DIRECTION CONTROL (RXD INPUT) ASC1_TIC = 0x80; // SET TRANSMIT INTERRUPT FLAG ASC1_RIC = 0x0044; // Enable serial receive interrupt level 1 ASC1_BG = RValue; // SET BAUDRATE ASC1_CON = 0x8011; // SET SERIAL MODE ALTSEL0P3 |= 0x0003; // Configure port pins for serial interface 1 RSTCON &= 0x40; // Configure ResetOut } // Code for interrupt void ASC1_RxIsr(void) interrupt 0x49 // ASC1 Receive { ASC1_RIC = 0x00; radio_isr(0); ASC1_RIC = 0x44; } // Radio ISR int radio_isr(char mode) { c = (char) getchar_1(); ... ... .... }