Search found 12 matches

by mingthemad
Thu Jan 22, 2015 2:30 am
Forum: STM32 Support
Topic: [stm32f4] uartStart on UARTD2 causes crash
Replies: 6
Views: 5809

Re: [stm32f4] uartStart on UARTD2 causes crash

I found the problem.

The UARTConfig struct was declared on the stack, and hence was not available when the interrupt routine was called.

Once I made it static, everything started working. Making it global would work too.

Sorry for bugging everyone with a stupid problem :)

Craig
by mingthemad
Wed Jan 21, 2015 2:22 pm
Forum: STM32 Support
Topic: [stm32f4] uartStart on UARTD2 causes crash
Replies: 6
Views: 5809

Re: [stm32f4] uartStart on UARTD2 causes crash

Hi,

Where the crash happens? in the start code or in some callback? after starting callbacks are immediately active.

Giovanni

The callbacks are all empty functions at this time. As near as I can tell, the crash occurs inside uartStart which does not return. Unfortunately, the debugger is not ...
by mingthemad
Wed Jan 21, 2015 8:31 am
Forum: STM32 Support
Topic: [stm32f4] uartStart on UARTD2 causes crash
Replies: 6
Views: 5809

Re: [stm32f4] uartStart on UARTD2 causes crash

Forgot to mention: I'm using version Chibios 2.6.6 with gcc 4.7.3
by mingthemad
Wed Jan 21, 2015 2:40 am
Forum: STM32 Support
Topic: [stm32f4] uartStart on UARTD2 causes crash
Replies: 6
Views: 5809

[stm32f4] uartStart on UARTD2 causes crash

I've been using Chibios for several years on the STM32F4x7 devices and it's been working great.

I'm about to implement a ModBus handler over RS-485 and I want to use the UART device driver on USART2.

However, the call to initialise the driver always causes the program to crash. The config is below ...
by mingthemad
Tue Jan 29, 2013 1:22 am
Forum: STM32 Support
Topic: STM32F4 "lockup" due to continuous I2C interrupts
Replies: 10
Views: 14673

Re: STM32F4 "lockup" due to continuous I2C interrupts

My first priority was to get the product working, so I have implemented software I2C in order to avoid the lockup problem.

I will try and get a small sample program for the STM32F4 working this week, but you should be able to reproduce the condition version easily. Just initialise an any I2C port ...
by mingthemad
Thu Jan 24, 2013 12:52 pm
Forum: STM32 Support
Topic: STM32F4 "lockup" due to continuous I2C interrupts
Replies: 10
Views: 14673

STM32F4 "lockup" due to continuous I2C interrupts

Hi all,

I'm seeing problems with the Chibios I2C driver on the STM32F4 when there is noise
on the I2C data line. If the noise reaches a certain level, the processor "locks up" because
it is continuously servicing an I2C interrupt that never get cleared.

I was able to reduce the likelihood of ...
by mingthemad
Tue Oct 16, 2012 11:08 pm
Forum: General Support
Topic: i2c hangs when reading just one byte
Replies: 53
Views: 38752

Re: i2c hangs when reading just one byte

I think the problems are related.

My code was definitely crashing when I tried to receive only one byte.
When I changed to reading more bytes, the crashes stopped.

If you are getting crashes when trying to receive one byte, try using a
larger receive buffer - say 4 bytes - and leave the receive ...
by mingthemad
Tue Oct 16, 2012 2:58 am
Forum: General Support
Topic: i2c hangs when reading just one byte
Replies: 53
Views: 38752

Re: i2c hangs when reading just one byte

Further to this, I2C sample code from ST has the following:

/* If number of data to be read is 1, then DMA couldn't be used */
/* One Byte Master Reception procedure (POLLING) ---------------------------*/
if ((uint16_t)(*NumByteToRead) < 2)

Looks like polling is needed if less than one data ...
by mingthemad
Mon Oct 15, 2012 8:34 am
Forum: General Support
Topic: i2c hangs when reading just one byte
Replies: 53
Views: 38752

Re: i2c hangs when reading just one byte

I've think I've just hit this problem too.

When trying to receive just one byte, the logic analyser shows
that the I2C port is requesting two bytes. Occasionally, the
port locks up and needs a power off to recover.

I think problem may lie with special handling of one byte transfers as described ...
by mingthemad
Wed Oct 03, 2012 3:58 pm
Forum: Development and Feedback
Topic: Simulator on Linux or Windows
Replies: 17
Views: 28025

Re: Simulator on Linux or Windows [FIXED]

I was able to get the Linux emulator working after some Makefile munging.

It looks like the Makefile for demos/Posix-GCC assumes an older make environment.
I've created a new one based on the STM32 demos.

I've also added a rules.mk file to ports/GCC/SIMIA32 directory to be consistent with
the ...