microsoft / jacdac-stm32x0

Jacdac implementation for STM32F0 and similar
MIT License
11 stars 10 forks source link

DSpi patches for ncv h-bridge driver #39

Closed jamesadevine closed 2 years ago

jamesadevine commented 2 years ago

@mmoskal I need to neaten this up before merging.

The ncv h-bridge driver requires different spi settings and has a max clock of 5 MHz. I'm reticent to add yet more macros to configure SPI, but it may be required

mmoskal commented 2 years ago

you could add an argument to dspi_init() (lowspeed or something)

jamesadevine commented 2 years ago

Yeah, cpol and cpha too...

mmoskal commented 2 years ago

I have not yet encountered a device where you have to change these from 0/0, but I suppose they exist.

jamesadevine commented 2 years ago

Errr this h-bridge driver requires CPHA = 1