Search found 11 matches

by formica
Thu Apr 11, 2013 11:49 am
Forum: User Projects
Topic: Project FreeCopter (aka an example for ChibiOS SPI SLAVE)
Replies: 2
Views: 4601

Re: Project FreeCopter (aka an example for ChibiOS SPI SLAVE

Here the patch to use SPI in slave mode on the STM32F1x (but I think should work alson on F4).

--- spi_lld.c 2012-06-18 19:14:28.000000000 +0200
+++ /home/formica/chibios/chibios/os/hal/platforms/STM32/spi_lld.c 2013-04-10 12:21:44.096847872 +0200
@@ -294,10 +294,16 ...
by formica
Wed Apr 10, 2013 3:11 pm
Forum: User Projects
Topic: Project FreeCopter (aka an example for ChibiOS SPI SLAVE)
Replies: 2
Views: 4601

Project FreeCopter (aka an example for ChibiOS SPI SLAVE)

Dear all,
I'm developing the FreeCopter project using ChibiOS on STM32F1, and I'd like to share with you the code also because I succeed to build an SPI Master/Slave communication... could be interesting for someone because there is no official support for the SPI SLAVE in Chibios.

The code is on ...
by formica
Wed Apr 03, 2013 10:11 am
Forum: STM32 Support
Topic: Strange SPI Behavior
Replies: 11
Views: 9468

Re: Strange SPI Behavior

Yes, I'm running with all the DEBUG options activated. :)

I'm using that rule, deactivating everything and re-introducing the peripherals one by one... but still I don't understand what exactly goes wrong!
by formica
Wed Apr 03, 2013 8:24 am
Forum: STM32 Support
Topic: Strange SPI Behavior
Replies: 11
Views: 9468

Re: Strange SPI Behavior

My last version: I added a control on the USB_STATE.
As before, sometimes, when I don't read the USB from the terminal, the SPI hangs up.

Any idea?


systime_t time = chTimeNow(); // T0
while (TRUE) {

time += MS2ST(25); // Next deadline
// bmp085_read_temp();
// bmp085_read_press(BMP_MODE_PR0 ...
by formica
Tue Apr 02, 2013 6:59 pm
Forum: STM32 Support
Topic: Strange SPI Behavior
Replies: 11
Views: 9468

Re: Strange SPI Behavior

I'm using an STM32F103RBT6!
I don't know what is a CCM memory (maybe an external ram). In this case... no, I'm just using a raw stm32f103rbt6 with some sensors on the I2C bus (gyro,acc,magn).
I attach the main file (with a lot of comments inside... It's a very dirty piece of code, sorry).
Now usb ...
by formica
Sun Mar 31, 2013 2:15 am
Forum: STM32 Support
Topic: Strange SPI Behavior
Replies: 11
Views: 9468

Re: Strange SPI Behavior

I discovered that the problem exists when, in the main thread, I use the serial-usb. It seems that SPI and SerialUsb cannot co-exist. If I move the spi in another thread... everything is ok. It sounds really strange! :|
by formica
Fri Mar 29, 2013 1:00 pm
Forum: STM32 Support
Topic: Strange SPI Behavior
Replies: 11
Views: 9468

Re: Strange SPI Behavior

Thanks giovanni for your quick response. Also using your correction I obtain the same behavioe. The main thread doesn't communicate through spi. I'm chechking with the oscilloscope everytime.
by formica
Thu Mar 28, 2013 1:18 pm
Forum: STM32 Support
Topic: Strange SPI Behavior
Replies: 11
Views: 9468

Strange SPI Behavior

I observe a strange behavior traying to use the SPI on my custom board:


cRPY_16bit[0] = 128;
cRPY_16bit[1] = 128;
cRPY_16bit[2] = 128;
cRPY_16bit[3] = 128;
cRPY_16bit[4] = 128;

spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
spiStart ...
by formica
Tue Aug 07, 2012 8:39 pm
Forum: General Support
Topic: Syncronous/Asyncronous SPI??
Replies: 3
Views: 3674

Syncronous/Asyncronous SPI??

Dear all,
I'm a little bit confused about the SPI API. Reading the documentation there are some function used for a syncronous communication and others for asyncronous one.
I know that that the SPI protocol has a dedicate clock line so it is intrinsically syncronous.
So, what does it means ...
by formica
Thu May 31, 2012 10:40 am
Forum: General Support
Topic: [SOLVED] shell problem with STM32F103
Replies: 9
Views: 8109

Re: [SOLVED] shell problem with STM32F103

I confirm that using also the jsnyder toolchain the problem is solved.
But still we don't know why. :D

formica

P.S. Thx tectu. I found the gcc-arm-embedded sources for linux... but not the precompiled bins. Can you help me?