Using the UART I need to pause out my characters like this.
USARTdrv->Send("A", 1); osDelay(20); USARTdrv->Send("T", 1);
If I don't my device does not reply at all. When spacing it out the CMSIS is calling the ARM_USART_EVENT_RX_TIMEOUT break point, yet I get a good reply from the device? I;d like to understand what is going on here rather then ignoring the break point and moving on .
the baud and bits are correct USARTdrv->Control(ARM_USART_MODE_ASYNCHRONOUS | ARM_USART_DATA_BITS_8 | ARM_USART_PARITY_NONE | ARM_USART_STOP_BITS_1 | ARM_USART_FLOW_CONTROL_NONE, 9600);
My reply from the device is about 300ms, is there a setting for timeout?
I guess my issues were with this line Receive(cmd,sizeof(cmd)/sizeof(cmd[0]))
I was not sure how to handle the reply. If I know i'm getting two and do this Receive(&cmd, 1); I get ARM_USART_EVENT_RX_OVERFLOW
The way above I get ARM_USART_EVENT_RX_TIMEOUT
I believe I have most of my issues resolved just one last unknown here?
USARTdrv->Send("AT", 2); osSignalWait(0x01, osWaitForever); cmd=0; while(cmd==0) { USARTdrv->Receive(&cmd, 2); osSignalWait(0x01, osWaitForever); } osDelay(1000);
this code works twice, after the second iteration it throws a ARM_USART_EVENT_RX_TIMEOUT
After the delay it never sends. On my scope I see this.
AT OK AT OK
..then nothing more as the break point was hit, why twice?
err, ok a bit confused here?
USARTdrv->Send("AT1234567", 9); printf("\nsending"); Output is "sending"
USARTdrv->Send("AT12345678", 10); printf("\nsending"); Output is "" apparently getting stuck in the Send function.
Why cant I send more the 9?
- What device are you using? - What compiler version are you using - What version of the CMSIS Packs are you using? What version of components? You can look in the build log file for these details
http://www.keil.com/support/docs/3734.htm
What device are you using? - stm32f205 - What compiler version are you using about says - v5.25.2.0 log says uvision v5.06 build750 - What version of the CMSIS Packs are you using? - V1.02 What version of components? - can't seem to find this one.