[NEW] SPI driver improvements

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome.
User avatar
Giovanni
Site Admin
Posts: 10341
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 231 times
Been thanked: 205 times
Contact:

[NEW] SPI driver improvements

Postby Giovanni » Sun Sep 03, 2017 4:47 pm

Hi,

The SPI driver model received some improvements, the CS selection can be done in 5 different ways:

0) None, spiSelect() and spiUnselect() are do nothing, this is useful when using some HW CS handling, no space wasted in the configuration structure.
1) Pad, it is the current mode, you specify port and pad.
2) Port, you specify port and bit mask, faster than 1) because it saves a bit shift, on CM0 it saves 3 instruction in select and 3 in unselect, fastest mode when latency is important.
3) Line, it uses an ioline_t for selection, saves space in the configuration structure but it is a bit slower.
4) LLD-defined, it does not use PAL at all, implementation is delegated to the LLD, not used on STM32.

Now PAL-related fields are no more part of the variant part of the configuration structure, those are a standard feature.

Note for the maintainers, the default is the classic mode (pad) but all other implementations should be aligned to the STM32 one.

Giovanni

Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 3 guests