Search found 53 matches

by matis
Fri Mar 09, 2012 2:42 pm
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Re: Bare metal I2C breaks ChibiOS i2cMasterTransmit

It doesn't because ChibiOS initializes the vector table address himself when chSysInit() is invoked, so configure that in ChibiOS, it is an option of the port layer.

Giovanni
Giovanni,

It is not ChibiOS that I mentioned, but the bare metal bootloader. In ChibiOS I set location of the VTOR ...
by matis
Fri Mar 09, 2012 2:13 pm
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Re: Bare metal I2C breaks ChibiOS i2cMasterTransmit

There is an article about shutting down ChibiOS and restarting it, did you check it out?

Giovanni
Giovanni,

no I was not aware of that. I've looked it through, but I can't find a decent way to stop the system timer. When I jump from user_app to boot_app, the bare metal "TIM2_IRQHandler" (in the ...
by matis
Thu Mar 08, 2012 3:04 pm
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Re: Bare metal I2C breaks ChibiOS i2cMasterTransmit

I get interrupts from USART1_IRQHandler before I even started the UART1 in user_app
I would try to manually disable interrupts from all peripherals and than clear all interrupts flags before jumping to user app.
That seems to fix the problem sofar when jumping from ChibiOS to ChibiOS ...
by matis
Thu Mar 08, 2012 2:34 pm
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Re: Bare metal I2C breaks ChibiOS i2cMasterTransmit

I think I found where it might go wrong.

When I leave the boot_app I disable all ports.
In the user_app main, just after enabling the HAL (and thus ports including interrupts), I get interrupts from USART1_IRQHandler before I even started the UART1 in user_app. I think that the boot_app interrupt ...
by matis
Thu Mar 08, 2012 1:48 pm
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Re: Bare metal I2C breaks ChibiOS i2cMasterTransmit

Strange issue.
Agreed

I have observed such behavior in two cases: when mcu putted to deep sleep state and when I manually disable mcu's jtag pins. That seems to be right, while chSysDisable() disables all ports.

Are absolutely sure that you flash correct bin files in correct offsets ...
by matis
Thu Mar 08, 2012 12:03 pm
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Re: Bare metal I2C breaks ChibiOS i2cMasterTransmit

Now I'm trying to work with two ChibiOS-apps, where the one jumps to the other and vice versa. But I'm struggling with the debugger at the moment.
My bad, I tried to flash the .elf file instead of the .bin file.

What I've got now:
Two ChibiOS applications (lets call them for ease boot and user ...
by matis
Thu Mar 08, 2012 11:15 am
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Re: Bare metal I2C breaks ChibiOS i2cMasterTransmit

I need more information. Try to explain step by step:
1) what you do (describe in details) The bootloader accepts bytes from a UART bus. This can be commands or firmware bytes (for updating). It can also decide (from a bit in a MAX7311 I2C slave) to switch (jump) to application mode or to stay in ...
by matis
Thu Mar 08, 2012 9:14 am
Forum: General Support
Topic: Bare metal I2C breaks ChibiOS i2cMasterTransmit
Replies: 14
Views: 13807

Bare metal I2C breaks ChibiOS i2cMasterTransmit

Dear All,

currently I'm done with the development of my ChibiOS application. In order to do firmware updates, we need to have a bootloader.
The bootloader is (due to its size) a bare metal app that reads a I2C register to determine to jump to the ChibiOS app (flash : org = 0x0800F000, len = 452k ...
by matis
Wed Feb 29, 2012 3:28 pm
Forum: General Support
Topic: sdWrite only two bytes
Replies: 4
Views: 6337

Re: sdWrite only two bytes

It is easy to understand.

When you exit from sdWrite() you copied the message in the transmission buffer but it is still being transmitted asynchronously, when you do the reset then the still un-transmitted data is removed from the queue.

You need to make sure that your message has been ...
by matis
Wed Feb 29, 2012 11:43 am
Forum: General Support
Topic: sdWrite only two bytes
Replies: 4
Views: 6337

Re: sdWrite only two bytes

The problem seems to be in the chOQResetI(&SD3.oqueue);

When I remove this line, all the ten bytes are outputted like it should. Not sure why :(