Hi All,
I am using UART to receive values and then write those values to SRAM. I am using the Texas Instruments Stellaris LM4F120 board.
For this purpose, I am using the memcpy() function to write the received values over UART to my SRAM base address defined. The problem is the function call is made but with no result. Below are some snippets of the code which may be useful for analysis:
char *mycharacter;
//void *my_area = (void*)SRAM_BASE; //SRAM_BASE is defined as 0x20000000
void
UARTIntHandler(void)
{
unsigned long ulStatus;
//
// Get the interrrupt status.
ulStatus = ROM_UARTIntStatus(UART0_BASE, true);
// Clear the asserted interrupts.
ROM_UARTIntClear(UART0_BASE, ulStatus);
// Loop while there are characters in the receive FIFO.
while(ROM_UARTCharsAvail(UART0_BASE))
// Read the next character from the UART and write it back to the UART.
ROM_UARTCharPutNonBlocking(UART0_BASE,
mycharacter =ROM_UARTCharGetNonBlocking(UART0_BASE));
//mycharacter = (char*)ROM_UARTCharGetNonBlocking(UART0_BASE);
memcpy(my_area,&mycharacter,1);
// Blink the LED to show a character transfer is occuring.
Please provide your suggestions!
Thanks!
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, GPIO_PIN_2);