Hi everybody,
I am going to share these files to control L3GD20D(gyro) chip. The main.c file includes two tasks, so if someone has stm32f3discovery platform,
you can see the led lamp turn on / turn off in terms of position.
Thanks.
-- taisik tim ham --
spi control on L3GD20(gyro) chip.
-
taisik_ham
- Posts: 7
- Joined: Fri Mar 01, 2013 11:58 pm
spi control on L3GD20(gyro) chip.
- Attachments
-
- share.zip
- main handling file to control
- (42.56 KiB) Downloaded 641 times
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: spi control on L3GD20(gyro) chip.
Hi,
I am unable to open the zip file for some reason, please try to replace it.
Giovanni
I am unable to open the zip file for some reason, please try to replace it.
Giovanni
Re: spi control on L3GD20(gyro) chip.
Giovanni wrote:I am unable to open the zip file for some reason, please try to replace it.
Tectu agrees:
Code: Select all
[tectu@techome stuff]$ unzip -d share share.zip
Archive: share.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of share.zip or
share.zip.zip, and cannot find share.zip.ZIP, period.
The .zip isn't a .zip.
~ Tectu
-
taisik_ham
- Posts: 7
- Joined: Fri Mar 01, 2013 11:58 pm
Re: spi control on L3GD20(gyro) chip.
I am sorry, the archive software was megazipper so, it seems to make problem.
I archived tar command again.
I archived tar command again.
- Attachments
-
- share.tar
- (440 KiB) Downloaded 572 times
-
taisik_ham
- Posts: 7
- Joined: Fri Mar 01, 2013 11:58 pm
Re: spi control on L3GD20(gyro) chip.
I missed makefile, If it is beneficial, you can refer it.
- Attachments
-
- share1.tar
- (940 KiB) Downloaded 587 times
-
taisik_ham
- Posts: 7
- Joined: Fri Mar 01, 2013 11:58 pm
-
taisik_ham
- Posts: 7
- Joined: Fri Mar 01, 2013 11:58 pm
Re: spi control on L3GD20(gyro) chip.
Hi, So I changed ChibiOS/os/hal/STM32/GPIOv2/pal_lld.c void _pal_lld_setgroupmode function changed by myself.
It is better to inspect throughly. it was reorganized based on ST source.
--- Tim Taisik Ham ---
I am wondering how to be tested. Because I cannot find out the usage anywhere.
It is better to inspect throughly. it was reorganized based on ST source.
--- Tim Taisik Ham ---
I am wondering how to be tested. Because I cannot find out the usage anywhere.
-
taisik_ham
- Posts: 7
- Joined: Fri Mar 01, 2013 11:58 pm
Re: spi control on L3GD20(gyro) chip.
Hi, So I changed ChibiOS/os/hal/STM32/GPIOv2/pal_lld.c void _pal_lld_setgroupmode function changed by myself.
It is better to inspect throughly. it was reorganized based on ST source.
--- Tim Taisik Ham ---
I am wondering how to be tested. Because I cannot find out the usage anywhere.
It is better to inspect throughly. it was reorganized based on ST source.
--- Tim Taisik Ham ---
I am wondering how to be tested. Because I cannot find out the usage anywhere.
Re: spi control on L3GD20(gyro) chip.
Hi Tim,
You should really create a clean archive file before sending it for contribution!
The share1.tar files contains inside a backup/share.zip which is another tgz file, it also has a tar file name share.tar and the gyro.mak which should be a makefile is actually another tar... what a mess!
Regarding the code there's two things I would like to point:
1) You should not be using the stmlib files (even worse is adding them together with your project). ChibiOS/RT already has the SPI functionality you need in the HAL and you should be using it. This way your driver would work on every architecture that has SPI support.
2) You should not modify the low-level stm32 pal driver for the same reason pointed before. But apart from this, when contributing code to any open source project it's customary to use the Coding Guidelines of the project which exist to maintain a consistent codebase. Your changes to the PAL driver have mixed tabs/spaces and inconsistent code style. This should not happen when contributing code.
Best regards
You should really create a clean archive file before sending it for contribution!
The share1.tar files contains inside a backup/share.zip which is another tgz file, it also has a tar file name share.tar and the gyro.mak which should be a makefile is actually another tar... what a mess!
Regarding the code there's two things I would like to point:
1) You should not be using the stmlib files (even worse is adding them together with your project). ChibiOS/RT already has the SPI functionality you need in the HAL and you should be using it. This way your driver would work on every architecture that has SPI support.
2) You should not modify the low-level stm32 pal driver for the same reason pointed before. But apart from this, when contributing code to any open source project it's customary to use the Coding Guidelines of the project which exist to maintain a consistent codebase. Your changes to the PAL driver have mixed tabs/spaces and inconsistent code style. This should not happen when contributing code.
Best regards