This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uart pack installer issue

Dear All,

I'm trying to implement "UART" into the cortex-m3 by using uVision5.24.
So I opened pack installer of uVision.
But I can't find any regarding of UART in Pack Installer.

All Devices->ARM->ARM Cortex M3.

Would you please help me how to find the UART driver code of ARM Cortex M3 CMSDK's standard not the STM32's UART.

Here's snippet code of CMSDK's UART code

unsigned char UartPutc(unsigned char my_ch)
{ while ((CMSDK_UART2->STATE & 1)); // Wait if Transmit Holding register is full CMSDK_UART2->DATA = my_ch; // write to transmit holding register return (my_ch);
}

But STM32's UART code is quite a bit different.
int SendChar (int c) { struct buf_st *p = &tbuf;

// If the buffer is full, return an error value if (SIO_TBUFLEN >= TBUF_SIZE) return (-1);

p->buf [p->in & (TBUF_SIZE - 1)] = c; // Add data to the transmit buffer. p->in++;

if (tx_restart) { // If transmit interrupt is disabled, enable it tx_restart = 0; USART1->CR1 |= USART_FLAG_TXE; // enable TX interrupt }

return (0);
}

So I want to know the difference between them.
and I want to find the CMSDK's UART code not the STM32