nuttx/arch/mips/src
Daniel P. Carvalho e26d467fab
Some checks are pending
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
arch/mips/pic32mz: do not exceed the requested SPI frequency.
spi_setfrequency() in pic32mz_spi.c rounded the baud rate divisor down,
so the SCK frequency could be higher than the one requested by the
device driver (e.g. 20 MHz requested with a 100 MHz PBCLK2 gave 25 MHz).
A request above PBCLK/2 gave a zero divisor and a division by zero when
computing the actual frequency; the SST26 driver's default of 64 MHz
does that with any peripheral bus clock below 128 MHz.

Round the divisor up instead, so the actual frequency never exceeds the
requested one and the divisor is never zero.  Boards whose requested
frequency is not an exact divisor of PBCLK/2 now run SPI at a lower
clock than before.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
2026-10-05 12:30:56 -03:00
..
common arch/mips: Add basic support for MIPS Creator CI20 board 2026-07-15 08:02:55 -03:00
jz4780 arch/mips/jz4780: Add HDMI EDID parsing and dynamic display modes 2026-08-29 11:08:25 -03:00
mips32 arch/mips/pic32mz: initialize both L1 caches when KSEG0 is cacheable. 2026-10-04 17:16:09 -03:00
pic32mx include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
pic32mz arch/mips/pic32mz: do not exceed the requested SPI frequency. 2026-10-05 12:30:56 -03:00
.gitignore
Makefile mips/Makefile: Add nuttx build with CONFIG_ALLSYMS enabled. 2026-08-11 09:53:38 -03:00