If you plan to port to 3.0 then you may consider putting it in the community repository that barthess and Tectu are restructuring.
Files in that repository will be distributed with normal ChibiOS releases.
Giovanni
I2C Slave mode support?
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
-
- Posts: 65
- Joined: Thu Oct 03, 2013 1:06 am
- Location: Santa Cruz, California
- Has thanked: 1 time
- Been thanked: 1 time
Re: I2C Slave mode support?
Note:
I missed the i2cslave.h file in github commit last Friday.
It's there (in the I2Cmultimaster branch) now.
Regarding 3.0:
Could you point me to document that summarizes the new features and major changes?
Is it more or less feature frozen at this point?
Perhaps, if I knew more about 3.0, I could justify switching to it.
Regarding 2.6 stable:
I forward ported to the latest release because I was getting requests from other users to do so.
And, I wanted to stay current for our own project.
I will continue to support the I2C multimastering driver in 2.6.
The multimastering driver is intended to be backward compatible with the existing master-only driver.
Others have confirmed this.
What, at this point, prevents inclusion of the multimastering driver into the stable release?
Please consider it.
If there's some feature of the existing driver that the multimastering version is not supporting,
please let me know.
I missed the i2cslave.h file in github commit last Friday.
It's there (in the I2Cmultimaster branch) now.
Regarding 3.0:
Could you point me to document that summarizes the new features and major changes?
Is it more or less feature frozen at this point?
Perhaps, if I knew more about 3.0, I could justify switching to it.
Regarding 2.6 stable:
I forward ported to the latest release because I was getting requests from other users to do so.
And, I wanted to stay current for our own project.
I will continue to support the I2C multimastering driver in 2.6.
The multimastering driver is intended to be backward compatible with the existing master-only driver.
Others have confirmed this.
What, at this point, prevents inclusion of the multimastering driver into the stable release?
Please consider it.
If there's some feature of the existing driver that the multimastering version is not supporting,
please let me know.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: I2C Slave mode support?
Hi,
3.0 is pretty much finished, and interfaces are unlikely to change, there is an article in the documentation section about changes.
Basically, drivers must not use "ch" APIs nor include "ch.h", OSAL functions must be used instead. For example "osalSysLock()" instead of "chSysLock()". This ensures that the HAL can be used with any RTOS implementing an OSAL or even without RTOS.
Giovanni
3.0 is pretty much finished, and interfaces are unlikely to change, there is an article in the documentation section about changes.
Basically, drivers must not use "ch" APIs nor include "ch.h", OSAL functions must be used instead. For example "osalSysLock()" instead of "chSysLock()". This ensures that the HAL can be used with any RTOS implementing an OSAL or even without RTOS.
Giovanni
Re: I2C Slave mode support?
I ported genosensor's work to 3.0 for the 32F4 - posted earlier in this thread.
Has been working solidly for over a month now as an I2C slave; haven't tried multimaster.
The interface works for me.
I do need to revisit it though - possibly its an F4 problem, but is very sensitive to glitches on SCLK, which lock things up. (Fundamentally a hardware problem, but I still don't think it should lock up!) Also (IIRC) didn't recover if received data wasn't properly terminated with a STOP condition.
Has been working solidly for over a month now as an I2C slave; haven't tried multimaster.
The interface works for me.
I do need to revisit it though - possibly its an F4 problem, but is very sensitive to glitches on SCLK, which lock things up. (Fundamentally a hardware problem, but I still don't think it should lock up!) Also (IIRC) didn't recover if received data wasn't properly terminated with a STOP condition.
-
- Posts: 65
- Joined: Thu Oct 03, 2013 1:06 am
- Location: Santa Cruz, California
- Has thanked: 1 time
- Been thanked: 1 time
Re: I2C Slave mode support?
Steved,
That's good to hear. We've been using the driver in a multimastering network for a few months now. No code changes for quite some time.
What chip did you test with?
(does it use the older V1 I2C module, or the updated V2?)
Where have you posted the code?
Thanks.
That's good to hear. We've been using the driver in a multimastering network for a few months now. No code changes for quite some time.
What chip did you test with?
(does it use the older V1 I2C module, or the updated V2?)
Where have you posted the code?
Thanks.
-
- Posts: 65
- Joined: Thu Oct 03, 2013 1:06 am
- Location: Santa Cruz, California
- Has thanked: 1 time
- Been thanked: 1 time
Re: I2C Slave mode support?
Giovanni,
Is this the article you mean?
http://www.chibios.org/dokuwiki/doku.ph ... rom_2_to_3
Is there any documentation on the OSAL layer?
Can you speak to the issues preventing inclusion of the I2C multimastering driver into 2.6?
Is this the article you mean?
http://www.chibios.org/dokuwiki/doku.ph ... rom_2_to_3
Is there any documentation on the OSAL layer?
Can you speak to the issues preventing inclusion of the I2C multimastering driver into 2.6?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: I2C Slave mode support?
There is no documentation yet for 3.0, see /os/hal/osal/rt/osal.h for details about the API.
2.6.x is in maintenance mode, nothing will be added there, only bugs fixed.
Giovanni
2.6.x is in maintenance mode, nothing will be added there, only bugs fixed.
Giovanni
Re: I2C Slave mode support?
genosensor wrote:What chip did you test with?
(does it use the older V1 I2C module, or the updated V2?)
Where have you posted the code?
Working with the 32F4 ATM, which is the V1 I2C module. Will need to port to the 32F0 (V2 I2C) at some point.
Code here: http://forum.chibios.org/phpbb/viewtopic.php?f=2&t=1502&start=20#p17146
Re: I2C Slave mode support?
Found a bug in the port of genosensor's I2C slave/multimaster routines to Chibi 3 - a missing critical section.
Updated routines attached.
Have also made what I hope are improvements in master mode - easily reversible with a #define if necessary.
Haven't tested multimaster mode at all.
Updated routines attached.
Have also made what I hope are improvements in master mode - easily reversible with a #define if necessary.
Haven't tested multimaster mode at all.
- Attachments
-
- ST_I2C_V1.zip
- (25.52 KiB) Downloaded 293 times
-
- Posts: 65
- Joined: Thu Oct 03, 2013 1:06 am
- Location: Santa Cruz, California
- Has thanked: 1 time
- Been thanked: 1 time
Re: I2C Slave mode support?
Thanks for spotting these omissions.
I've updated the 2.6 multimaster I2C driver in my github repo on the branch "I2Cmultimaster"
I've updated the 2.6 multimaster I2C driver in my github repo on the branch "I2Cmultimaster"
Code: Select all
git clone https://github.com/brentr/ChibiOS-RT.git
cd ChibiOS-RT
git checkout I2Cmultimaster
Who is online
Users browsing this forum: No registered users and 48 guests