Actual PicoCalc I2C usage and clocks?

Interesting and strange too. Thanks @guu

In the meanwhile I have done something: I installed a Pico 2 with MicroPython v1.26.0 (from micropython.org) on the PicoCalc and ran I2C scan varying the speed from 10KHz to 30MHz without errors (without/with DS3231 RTC). Scanning the bus with a Pico 2W under WebMite produced intermittent errors with the “default” 10Khz bus speed. The following is an example of the result with the RTC attached:

PicoMite System I2C2 Scanner
     0 1 2 3 4 5 6 7 8 9 A B   C D E F
00:  . . . . . . . . - - - - - - - -
10:  - - - - - - - - - - - - - - -1F
20:  - - - -24 - - - - - - - - -2E -
30:  - - - - - - - - - - - - - - - -
40:  - - - - - - - - - - - - - - - -
50:  - - - - - - -57 - - - - - -5E -
60:  - - - - - - - -68 - - - - - - -
70: 70 - - - - - - - - -7A - - - - -

The next run: (correct)

PicoMite System I2C2 Scanner
     0 1 2 3 4 5 6 7 8 9 A B   C D E F
00:  . . . . . . . . - - - - - - - -
10:  - - - - - - - - - - - - - - -1F
20:  - - - - - - - - - - - - - - - -
30:  - - - - - - - - - - - - - - - -
40:  - - - - - - - - - - - - - - - -
50:  - - - - - - -57 - - - - - - - -
60:  - - - - - - - -68 - - - - - - -
70:  - - - - - - - - - - - - - - - -

and once more:

PicoMite System I2C2 Scanner
     0 1 2 3 4 5 6 7 8 9 A B   C D E F
00:  . . . . . . . . - - - - - - - -
10:  - -12 - - - - - - - - -1C - -1F
20:  - - - - - - - - - - - - - - - -
30:  - - - - - - - - - - - - - - - -
40:  - - - - - - - - - - - - - - - -
50:  - - - - - - -57 - - - - - - - -
60:  - - - - - - - -68 - - - - - - -
70:  - -72 - - - - - - - - -7C - - -

1F PicoCalc
57 EEPROM
68 RTC DS3231

I have this horrible feeling that there might be a software problem somewhere.

Um, you misunderstand. I said the firmware on the stm32 has the problem, not the stm32 platform.

No worries, I understood that, but the platform itself (F1 series) is also a source of problems in some cases (especially memory management).

Think I read somewhere there’s a more capable STM that is pin and footprint compatible. Now there’s a thought….

I had touched on the subject at one point too… The STM32F405 is the only candidate in the F4 series (and I believe across the entire range) that is pin-to-pin compatible.
But at this point, a new motherboard is worth the time invested I think.

1 Like

I have done something unexpected and the result is surprising :grinning_face:

I have done a few changes to the sources to enable 400KHz (really 367Khz) on I2C2 (PicoMite RP2350) and I have not (yet)* noticed any problems. Somehow it seems to perform better with I2C although sometimes phantom devices get reported while scanning the I2C bus, but not as much as running at 10KHz.

Surprising is that “I2C2 CHECK &H1F” does not bring up the error message “I2C Keyboard not responding” with the higher (100&400) clock speed. This is a permanent error with the 10KHz clock speed.

Update 1: Something is going wrong at 400KHz:
”[6] Loop” and “[6] Text” printing continuously on the LCD.

Update 2: With 400KHz there are regular crashes:
as above but also “[6] Colo” being printed. Now looking at 100KHz, I2C scan still occasionally shows ghosts, waiting to see what happens next.

Update 3: With 100KHz there are still problems not as many as with 400KHz. Now running with 50KHz and seems to be stable although I2C scan is still reporting ghost devices. The I2C Check error did not yet appear.

Please be aware that there a DS3231 is attached to the bus.

3 Likes

Bad me, I should have made a final post.

The problems have been identified and solved in the V6.01.00 and later, a few rewrites in the keyboard routine were needed.

2 Likes