pimoroni / pimoroni-pico

Libraries and examples to support Pimoroni Pico add-ons in C++ and MicroPython.
https://shop.pimoroni.com/collections/pico
MIT License
1.32k stars 499 forks source link

Issue: 2350 possible SPI baud rates are different. #985

Open AndrewCapon opened 3 months ago

AndrewCapon commented 3 months ago

Hi Guys,

This one may have some impact on all your SPI code.

I noticed it in the st7789 code, it was asking for baud 62'500'000 and getting 37'500'000.

I fixed it here with:

    // The ST7789 requires 16 ns between SPI rising edges.
    // 16 ns = 62,500,000 Hz
    // 2350 doesn't support 62,500,000 so use 75,000,000 seems to work.
#if !PICO_RP2350
    static const uint32_t SPI_BAUD = 62'500'000;
#else
    static const uint32_t SPI_BAUD = 75'000'000;
#endif

So just a heads up that you may be seeing some issues...

Cheers

Andy

peardox commented 1 month ago

Well, that fixed my slow display :)