You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "fdcavalcanti (via GitHub)" <gi...@apache.org> on 2025/07/04 18:15:29 UTC
[PR] arch/risc-v: fix I2C timeout and board compilation requirements [nuttx]
fdcavalcanti opened a new pull request, #16676:
URL: https://github.com/apache/nuttx/pull/16676
## Summary
- arch/risc-v: set SCL timeout for esp_i2c.c
- boards/risc-v: fix config for SPI and I2C drivers
This PR fixes a condition where the I2C clock would timeout due to low tolerance on ESP32C3, ESP32C6 and ESP32H2.
Also, there are some boards level changes:
- Requirements to build I2C and SPI support changed from `CONFIG_I2C_DRIVER` to CONFIG_I2C (same for SPI).
- Change logging function to `syslog`.
## Impact
- Impact on user: Yes, fix a condition where I2C clock would timeout and fix compilation requirements for I2C and SPI.
- Impact on build: Yes, building I2C and SPI drivers now require CONFIG_I2C/CONFIG_SPI instead of CONFIG_I2C_DRIVER and CONFIG_SPI_DRIVER. Moved the latter to the proper location.
- Impact on hardware: No.
- Impact on documentation: No.
- Impact on security: No.
- Impact on compatibility: No.
## Testing
Tested internally on CI and manually by communicating with MPU6050.
### Building
- `./tools/configure.sh esp32c6-devkitc:mpu60x0`
- Enable `CONFIG_SYSTEM_I2CTOOL`
### Running
Call a sequential read on the I2C bus using I2CTOOL. Verify data is properly transmitted.
```
nsh> i2c set -a 68 3b 1
WROTE Bus: 0 Addr: 68 Subaddr: 00 Value: 3b
nsh> i2c get 8
READ Bus: 0 Addr: 68 Subaddr: 00 Value: 12
READ Bus: 0 Addr: 68 Subaddr: 00 Value: ff
READ Bus: 0 Addr: 68 Subaddr: 00 Value: 02
READ Bus: 0 Addr: 68 Subaddr: 00 Value: ee
READ Bus: 0 Addr: 68 Subaddr: 00 Value: 00
READ Bus: 0 Addr: 68 Subaddr: 00 Value: 00
READ Bus: 0 Addr: 68 Subaddr: 00 Value: ff
READ Bus: 0 Addr: 68 Subaddr: 00 Value: 00
```
### Results
Proper data was obtained with no timeout between sequential reads.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v: fix I2C timeout and board compilation requirements [nuttx]
Posted by "fdcavalcanti (via GitHub)" <gi...@apache.org>.
fdcavalcanti commented on PR #16676:
URL: https://github.com/apache/nuttx/pull/16676#issuecomment-3045825896
> @fdcavalcanti please fix this issue:
>
> ```
> src/esp_board_spislavedev.c: In function 'board_spislavedev_initialize':
> Error: src/esp_board_spislavedev.c:73:3: error: implicit declaration of function 'spiinfo'; did you mean 'psiginfo'? [-Wimplicit-function-declaration]
> 73 | spiinfo("Initializing /dev/spislv%d...\n", bus);
> | ^~~~~~~
> | psiginfo
> ```
Thank you @acassis, totally missed this one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v: fix I2C timeout and board compilation requirements [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #16676:
URL: https://github.com/apache/nuttx/pull/16676#issuecomment-3045707894
@fdcavalcanti please fix this issue:
```
src/esp_board_spislavedev.c: In function 'board_spislavedev_initialize':
Error: src/esp_board_spislavedev.c:73:3: error: implicit declaration of function 'spiinfo'; did you mean 'psiginfo'? [-Wimplicit-function-declaration]
73 | spiinfo("Initializing /dev/spislv%d...\n", bus);
| ^~~~~~~
| psiginfo
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v: fix I2C timeout and board compilation requirements [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #16676:
URL: https://github.com/apache/nuttx/pull/16676
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org