Page 1 of 1

usart2 is not gettiing configured.

Posted: Sun Feb 19, 2017 10:14 am
by ep.hobbyiest
Hi,
I am using stm32f103 controller. I was configuring UART2, but it is not getting configured it seems.
I changed board files as well to make sure pin configuration.
following is function stack when i stop the debug.

Code: Select all

   7 uart_lld_start_send() uart_lld.c:760 0x08001780   
   6 uartStartSend() uart.c:143 0x08001780   
   5 sendToFP() uartif.c:137 0x08001780   
   4 SendCmdFPS() uartif.c:151 0x08001780   
   3 uartStart() uart.c:98 0x0800225c   
   2 initUart() uartif.c:107 0x0800225c   
   1 main() main.c:185 0x0800225c   


and sometimes at uartp->txstate = UART_TX_ACTIVE;

Code: Select all

void uartStartSend(UARTDriver *uartp, size_t n, const void *txbuf) {

  osalDbgCheck((uartp != NULL) && (n > 0U) && (txbuf != NULL));
             
  osalSysLock();
  osalDbgAssert(uartp->state == UART_READY, "is active");
  osalDbgAssert(uartp->txstate != UART_TX_ACTIVE, "tx active");

  uart_lld_start_send(uartp, n, txbuf);
  uartp->txstate = UART_TX_ACTIVE;
  osalSysUnlock();
}


my code is on github.(first time i used github)
https://github.com/embhobbb/prj

Re: usart2 is not gettiing configured.

Posted: Sat Mar 11, 2017 4:49 am
by ep.hobbyiest
Hi again,
Still i am facing this problem.
I wanted to read some sensors over uart and send it PC. So, i was configuring for uart2(PA2, PA3).

Somebody, please have a look.
I have attached required files.

Re: usart2 is not gettiing configured.

Posted: Sat Mar 11, 2017 12:45 pm
by Giovanni
Your problem is that you are starting a transmission while already transmitting.

Giovanni

Re: usart2 is not gettiing configured.

Posted: Sun Mar 19, 2017 1:17 pm
by ep.hobbyiest
Always Thanks Giovanni.