|
HF-AS5047U Driver
0.1.0-dev
HF-AS5047U C++ Driver
|
SPI Communication Parameters. More...
#include <esp32_as5047u_test_config.hpp>
Static Public Attributes | |
| static constexpr uint32_t | FREQUENCY = 1000000 |
| 4MHz SPI frequency (conservative default) | |
| static constexpr uint8_t | MODE = 1 |
| SPI Mode 1 (CPOL=0, CPHA=1) | |
| static constexpr uint8_t | QUEUE_SIZE = 1 |
| Transaction queue size. | |
| static constexpr uint8_t | CS_ENA_PRETRANS = 1 |
| CS asserted N clock cycles before transaction. | |
| static constexpr uint8_t | CS_ENA_POSTTRANS = 1 |
| static constexpr uint8_t | SPI_HOST_ID = 2 |
| SPI host: 2 = SPI2_HOST, 3 = SPI3_HOST. Try 3 if SCLK does not toggle on your board. | |
SPI Communication Parameters.
The AS5047U supports SPI frequencies up to 10MHz.
SPI Mode: CPOL=0, CPHA=1 (Mode 1) Data format: 16-bit frames (default) or 24-bit frames (SPI_24 mode)
AS5047U SPI timing (per datasheet):
cs_ena_pretrans and cs_ena_posttrans are in clock cycles. At 4MHz: 1 cycle = 250ns, so 2 cycles = 500ns (above 350ns minimum)
|
staticconstexpr |
CS held N clock cycles after transaction
|
staticconstexpr |
CS asserted N clock cycles before transaction.
|
staticconstexpr |
4MHz SPI frequency (conservative default)
|
staticconstexpr |
SPI Mode 1 (CPOL=0, CPHA=1)
|
staticconstexpr |
Transaction queue size.
|
staticconstexpr |
SPI host: 2 = SPI2_HOST, 3 = SPI3_HOST. Try 3 if SCLK does not toggle on your board.