Search found 71 matches

by ulikoehler
Sun Sep 20, 2015 7:44 pm
Forum: User Projects
Topic: STML152 example
Replies: 1
Views: 1298

STML152 example

Hi, I just noticed that in the RT-STM32L152-DISCOVERY example, MCU = cortex-m4 However, as you can see in the datasheet http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00277537.pdf , the L1xx is a M3 CPU. I think this usually makes no difference as the M4 and M3 ...
by ulikoehler
Mon Sep 14, 2015 3:45 pm
Forum: STM32 Support
Topic: Microsecond delay.
Replies: 24
Views: 9754

Re: Microsecond delay.

@hyOzd: What clock source are you using? Have you taken care of clock source tolerance/drift?

Uli
by ulikoehler
Sat Sep 12, 2015 10:50 pm
Forum: STM32 Support
Topic: Microsecond delay.
Replies: 24
Views: 9754

Re: Microsecond delay.

@rew OK, so let me show you how I'd solve this problem. Let's assume you are using a STM32F0 MCU and you must ensure the SPI clock speed must be between 0.8 and 1.2 MHz (1.0 MHz nominal!). I'll compute that for my STM32F0 board. When looking e.g. at section 27.9.1 in the reference manual ( http://ww...
by ulikoehler
Sat Sep 12, 2015 8:02 pm
Forum: STM32 Support
Topic: 16k USB devices and Chibios.
Replies: 12
Views: 3335

Re: 16k USB devices and Chibios.

No, I only have the one serial thread and the main (idle) thread does nothing...

Uli
by ulikoehler
Sat Sep 12, 2015 1:12 am
Forum: STM32 Support
Topic: 16k USB devices and Chibios.
Replies: 12
Views: 3335

Re: 16k USB devices and Chibios.

I just tested it using some minimal hello world firmware and the issue could not be reproduced. I also looked at the code in hal_queues.c and didn't find any obvious issues. Therefore I'd say it's a bug somewhere in my code and not in the HAL itself. One tip regarding the USB stuff: If your USB devi...
by ulikoehler
Sat Sep 12, 2015 1:05 am
Forum: STM32 Support
Topic: Microsecond delay.
Replies: 24
Views: 9754

Re: Microsecond delay.

Giovanni, I agree 100% ;-) However, I think that the TIM polled delay is, practically speaking, a niche delay method. I think I have used it once to add some grace time somewhere in the ChibiOS 2.4 HAL init two years ago, because the system was not initialized at that point so I could not . The thin...
by ulikoehler
Sat Sep 12, 2015 12:35 am
Forum: STM32 Support
Topic: 16k USB devices and Chibios.
Replies: 12
Views: 3335

Re: 16k USB devices and Chibios.

I'll try if I get a minimal firmware working to reproduce this bug (if it is a bug after all...). Although the RS485 firmware only has ~250 SLOC I suspect there might be other factors involved in this... Basically the queue gets filled up by a UART. I have an accelerometer with 100 Hz output datarat...
by ulikoehler
Fri Sep 11, 2015 9:31 pm
Forum: STM32 Support
Topic: Microsecond delay.
Replies: 24
Views: 9754

Re: Microsecond delay.

One more note: I think if not used from within a lock zone, gptPolledDelay() is indeed susceptible to interrupts etc. In the current form, you can IMO just call it from a lock zone and don't worry about it. Of course you can use my blog stuff for the wiki etc. under public domain. I'd appreciate a l...
by ulikoehler
Fri Sep 11, 2015 8:27 pm
Forum: STM32 Support
Topic: 16k USB devices and Chibios.
Replies: 12
Views: 3335

Re: 16k USB devices and Chibios.

@Giovanni: I have not dealt with the usb_pump thread at all, yet the adapter works perfectly. However I have noticed that if I do not sleep at any time in my thread, the USB will not work. Maybe this is related. I have also had some issues with the SDU output buffer that I have not pinned down: It i...
by ulikoehler
Fri Sep 11, 2015 8:09 pm
Forum: STM32 Support
Topic: 16k USB devices and Chibios.
Replies: 12
Views: 3335

Re: 16k USB devices and Chibios.

I have realized a USB RS485 adapter using the STM32F042F4. ChibiOS RT didn't work for space reasons. ChibiOS/NIL works perfectly well and i still have a few kilobytes left! While my application might be specific, I can share most of the code. I also have some other code regarding efficient conversio...

Go to advanced search