STM32L073 cpu support in conjunction with spi driver

Hello RIOT developers,

on the weekend I tried the STM32L073 support in conjunction with spi support but I had no success.

I wanted to test this on a board equiped with a STM32L073CZ MCU (48pin TQFP). Therefore I made a copy of the linker file (stm32l073rz.ld -> stm32l073cz.ld) and I altered the boards Makefile.include file to support this derivate (export CPU_MODEL = stm32l073cz).

I enabled spi support in the feature list inside of the Makefile (FEATURES_PROVIDED += periph_spi) and altered the device descriptor in the periph_conf.h file but I got no hardware response on the analyzer when I tried to run the second spi interface (SPI2). The MCU does nothing.

/**   * @name SPI configuration

Hi Neo,

Looking at the configuration you provide, it's hard to tell exactly what is the problem. How did you configure the clock for APB1 and APB2 in periph.conf ? If you set them to use highest speed (32MHz for this MCU), then the spi_divtable is wrong and you can reuse the values used for nucleo-l073 where the SPI works.

Hope that it helps,

Alex

----- Mail original -----

Hello Alex, thank you for your answer. I configure APB1 and 2 to work at 8Mhz because my attached device is slow. The values of the spi_divtable were new calculated via the spi_divtable tool. I wanted just know if spi was tested with the L073... Regards, Neo

RIOT OS kernel developers schrieb:

----- Mail original -----

Hello Alex, thank you for your answer. I configure APB1 and 2 to work at 8Mhz because my attached device is slow. The values of the spi_divtable were new calculated via the spi_divtable tool. I wanted just know if spi was tested with the L073...

On my side, I use SPI with nucleo-l073 and an SX1272 (on SPI1) and it works like a charm. Did you test other peripherals (UART, timers) ?

Alex