Search found 8 matches

by Wafelijzer
Mon Nov 23, 2015 5:04 pm
Forum: STM32 Support
Topic: STM32F4 serial driver misses sometimes one or morecharacters
Replies: 14
Views: 8071

Re: STM32F4 serial driver misses sometimes one or morecharac

Hi Giovanni,

I still have problems that the serial driver has a overrunning uart. My current setup:

* Receiver thread which waits for a CHN_INPUT_AVAILABLE event and has HIGHPRIO
* UART set at IRQ priority 2
* UART baudrate at 921600
* Some other threads with lower priority

I also tried by ...
by Wafelijzer
Wed Sep 23, 2015 6:54 pm
Forum: ChibiOS/HAL
Topic: canReceive random chSysHalt in osal
Replies: 2
Views: 2863

Re: canReceive random chSysHalt in osal

I really missed that one, that maybe explains random system hangs at different places because it is on the stack and is overwritten somewhere, sometime.
Now it is at the top of the file declared as static.

Thanks for catching that one, for now it seems to run fine!
by Wafelijzer
Wed Sep 23, 2015 3:09 pm
Forum: ChibiOS/HAL
Topic: canReceive random chSysHalt in osal
Replies: 2
Views: 2863

canReceive random chSysHalt in osal

Hi,

I'm facing random chSysHalt SV#10 and SV#11 when I enable checking (even stack overflow check).
My backtrace:

#0 0x080032b4 in chSysHalt (reason=0x80096f0 "SV#11") at ChibiOS/os/rt/src/chsys.c:175
#1 chDbgCheckClassS () at ChibiOS/os/rt/src/chdebug.c:253
#2 0x0800334e in ...
by Wafelijzer
Mon Sep 21, 2015 4:07 pm
Forum: STM32 Support
Topic: STM32F4 serial driver misses sometimes one or morecharacters
Replies: 14
Views: 8071

Re: STM32F4 serial driver misses sometimes one or morecharac

You are right, I changed the UART IRQ priority to 3 and until now I didn't have had any issues running a few minutes (normaly 20 seconds I halted the system).

Giovanni, I would to thank you for your help and point me at the correct debug steps and is much appreciated!
by Wafelijzer
Mon Sep 21, 2015 3:41 pm
Forum: STM32 Support
Topic: STM32F4 serial driver misses sometimes one or morecharacters
Replies: 14
Views: 8071

Re: STM32F4 serial driver misses sometimes one or morecharac

Thanks for you reply.

I set breakpoints to STM32/LLD/USARTv1/serial_lld.c:148 where:
if (sr & USART_SR_ORE)
sts |= SD_OVERRUN_ERROR;
m

And set breakpoint to the point where a byte is put onto the I/O queue at os/hal/src/serial.c:L207:
if (iqPutI(&sdp->iqueue, b) < Q_OK)
chnAddFlagsI(sdp, SD ...
by Wafelijzer
Mon Sep 21, 2015 3:17 pm
Forum: STM32 Support
Topic: STM32F4 serial driver misses sometimes one or morecharacters
Replies: 14
Views: 8071

Re: STM32F4 serial driver misses sometimes one or morecharac

Hi Giovanni,

I have added `SD_OVERRUN_ERROR` and checked it. It seems to get into this state on higher baudrates.
When I run at 115200 baud it just runs fine (for the time I tested). It should no happen because the
buffer size is 512 bytes. I also seems to happen with a buffer twice as big ...
by Wafelijzer
Mon Sep 21, 2015 12:27 pm
Forum: STM32 Support
Topic: STM32F4 serial driver misses sometimes one or morecharacters
Replies: 14
Views: 8071

Re: STM32F4 serial driver misses sometimes one or morecharac

Hi Giovanni,

Thanks for your reply. I already had all the needed checks enabled for ChibiOS. I switched to TIME_IMMEDIATE for sdReadTimeout (which is basicly the sdAsynchronousRead)
I created a event thread which checks for the available flags:


static THD_WORKING_AREA(dncm_modem_event_wa, 128 ...
by Wafelijzer
Mon Sep 21, 2015 9:27 am
Forum: STM32 Support
Topic: STM32F4 serial driver misses sometimes one or morecharacters
Replies: 14
Views: 8071

STM32F4 serial driver misses sometimes one or morecharacters

Hi All,

Hardware info:
Custom board with STM32F407
Serial port running at 921600 baud and RTS/CTS flow control (voltage levels are fine and verified)
Sierra Wireless HL8547 3G modem with serial port AT command interface.

chconf.h: SERIAL_BUFFERS_SIZE 512

I'm implementating a driver for a 3G modem ...