Appiko
Functions

Functions

void SdkEvalSpiDeinit (void)
 Deinitializes the SPI. More...
 
void SdkEvalSpiInit (void)
 Write single or multiple registers. More...
 
StatusBytes SdkEvalSpiWriteRegisters (uint8_t cRegAddress, uint8_t cNbBytes, uint8_t *pcBuffer)
 Write single or multiple registers. More...
 
StatusBytes SdkEvalSpiReadRegisters (uint8_t cRegAddress, uint8_t cNbBytes, uint8_t *pcBuffer)
 Read single or multiple registers. More...
 
StatusBytes SdkEvalSpiCommandStrobes (uint8_t cCommandCode)
 Send a command. More...
 
StatusBytes SdkEvalSpiWriteFifo (uint8_t cNbBytes, uint8_t *pcBuffer)
 Write data into TX FIFO. More...
 
StatusBytes SdkEvalSpiReadFifo (uint8_t cNbBytes, uint8_t *pcBuffer)
 Read data from RX FIFO. More...
 
void EepromSpiInitialization (void)
 Initializes the SPI for the EEPROM. SPI, MISO, MOSI and SCLK are the same used for the SPIRIT1. This function can be replaced by EepromCsPinInitialization if SpiritSpiInit is called. More...
 
void EepromCsPinInitialization (void)
 Initialization of the CSn pin of the EEPROM. This function is called internally by EepromCsPinInitialization. More...
 
void EepromCsXnucleoPinInitialization (void)
 Initialization of the CSn pin of the EEPROM for XNUCLEO boards. More...
 
void EepromWaitEndWriteOperation (void)
 Wait polling the SPI until the internal WIP flag is RESET. The flag is SET when a write operation is running. More...
 
uint8_t EepromStatus (void)
 Read the status register. More...
 
uint8_t EepromSetSrwd (void)
 Set the ERSR status bit. More...
 
uint8_t EepromResetSrwd (void)
 Reset the ERSR status bit. More...
 
void EepromWriteEnable (void)
 Set the internal WEL flag to allow write operation. More...
 
void EepromRead (uint16_t nAddress, uint8_t cNbBytes, uint8_t *pcBuffer)
 Read a page of the EEPROM. A page size is 32 bytes. The pages are 256. Page 0 address: 0x0000 Page 1 address: 0x0020 ... Page 255 address: 0x1FE0. More...
 
void EepromWrite (uint16_t nAddress, uint8_t cNbBytes, uint8_t *pcBuffer)
 Write a page of the EEPROM. A page size is 32 bytes. The pages are 256. Page 0 address: 0x0000 Page 1 address: 0x0020 ... Page 255 address: 0x1FE0 It is allowed to write only a page for each operation. If the bytes exceed the single page location, the other bytes are written at the beginning. More...
 
uint8_t SdkEvalGetHasEeprom (void)
 This function is to query if EEPROM is present or not. More...
 
void SdkEvalSetHasEeprom (uint8_t eeprom)
 This function is to set if EEPROM is present or not. More...
 

Detailed Description

Function Documentation

◆ EepromCsPinInitialization()

void EepromCsPinInitialization ( void  )
Parameters
None
Return values
None

Definition at line 173 of file SDK_EVAL_EEPROM.c.

◆ EepromCsXnucleoPinInitialization()

void EepromCsXnucleoPinInitialization ( void  )
Parameters
None
Return values
None
  • It affects EepromSPICSHigh/Low functions
  • Configure SPI pin: CS

Definition at line 201 of file SDK_EVAL_EEPROM.c.

Referenced by EepromIdentification().

◆ EepromRead()

void EepromRead ( uint16_t  nAddress,
uint8_t  cNbBytes,
uint8_t *  pcBuffer 
)
Parameters
None
Return values
None

Definition at line 376 of file SDK_EVAL_EEPROM.c.

◆ EepromResetSrwd()

uint8_t EepromResetSrwd ( void  )
Parameters
None
Return values
Status

Definition at line 324 of file SDK_EVAL_EEPROM.c.

◆ EepromSetSrwd()

uint8_t EepromSetSrwd ( void  )
Parameters
None
Return values
Status

Definition at line 301 of file SDK_EVAL_EEPROM.c.

◆ EepromSpiInitialization()

void EepromSpiInitialization ( void  )
Parameters
None
Return values
None

Definition at line 76 of file SDK_EVAL_EEPROM.c.

Referenced by EepromIdentification().

◆ EepromStatus()

uint8_t EepromStatus ( void  )
Parameters
None
Return values
Status

Definition at line 278 of file SDK_EVAL_EEPROM.c.

Referenced by EepromIdentification().

◆ EepromWaitEndWriteOperation()

void EepromWaitEndWriteOperation ( void  )
Parameters
None
Return values
None

Definition at line 250 of file SDK_EVAL_EEPROM.c.

◆ EepromWrite()

void EepromWrite ( uint16_t  nAddress,
uint8_t  cNbBytes,
uint8_t *  pcBuffer 
)
Parameters
None
Return values
None

Definition at line 418 of file SDK_EVAL_EEPROM.c.

◆ EepromWriteEnable()

void EepromWriteEnable ( void  )
Parameters
None
Return values
None

Definition at line 349 of file SDK_EVAL_EEPROM.c.

◆ SdkEvalGetHasEeprom()

uint8_t SdkEvalGetHasEeprom ( void  )
Parameters
None
Return values
1(yes) or 0 (no).

Definition at line 454 of file SDK_EVAL_EEPROM.c.

◆ SdkEvalSetHasEeprom()

void SdkEvalSetHasEeprom ( uint8_t  eeprom)
Parameters
1(yes) or 0 (no).
Return values
None

Definition at line 465 of file SDK_EVAL_EEPROM.c.

◆ SdkEvalSpiCommandStrobes()

StatusBytes SdkEvalSpiCommandStrobes ( uint8_t  cCommandCode)
Parameters
cCommandCodecommand code to be sent
Return values
Devicestatus

Definition at line 363 of file SDK_EVAL_Spi_Driver.c.

References COMMAND_HEADER, hal_spim_is_busy(), and hal_spim_tx_rx().

◆ SdkEvalSpiDeinit()

void SdkEvalSpiDeinit ( void  )
Parameters
None
Return values
None

Definition at line 141 of file SDK_EVAL_Spi_Driver.c.

References hal_spim_deinit().

◆ SdkEvalSpiInit()

void SdkEvalSpiInit ( void  )
Parameters
baudrate_prescalerbaudrate prescaler to be used Must be one of the SPI_BaudRate_Prescaler .
Return values
NoneInitializesthe SPI.
Parameters
None
Return values
None

Definition at line 231 of file SDK_EVAL_Spi_Driver.c.

References hal_spim_init_t::csBar_pin.

◆ SdkEvalSpiReadFifo()

StatusBytes SdkEvalSpiReadFifo ( uint8_t  cNbBytes,
uint8_t *  pcBuffer 
)
Parameters
cNbBytesnumber of bytes to read from RX FIFO
pcBufferpointer to data read from RX FIFO
Return values
Devicestatus

Definition at line 410 of file SDK_EVAL_Spi_Driver.c.

References hal_spim_is_busy(), hal_spim_tx_rx(), LINEAR_FIFO_ADDRESS, and READ_HEADER.

◆ SdkEvalSpiReadRegisters()

StatusBytes SdkEvalSpiReadRegisters ( uint8_t  cRegAddress,
uint8_t  cNbBytes,
uint8_t *  pcBuffer 
)
Parameters
cRegAddressbase register's address to be read
cNbBytesnumber of registers and bytes to be read
pcBufferpointer to the buffer of registers' values read
Return values
Devicestatus

Definition at line 341 of file SDK_EVAL_Spi_Driver.c.

References hal_spim_is_busy(), hal_spim_tx_rx(), and READ_HEADER.

◆ SdkEvalSpiWriteFifo()

StatusBytes SdkEvalSpiWriteFifo ( uint8_t  cNbBytes,
uint8_t *  pcBuffer 
)
Parameters
cNbBytesnumber of bytes to be written into TX FIFO
pcBufferpointer to data to write
Return values
Devicestatus

Definition at line 385 of file SDK_EVAL_Spi_Driver.c.

References hal_spim_is_busy(), hal_spim_tx_rx(), LINEAR_FIFO_ADDRESS, and WRITE_HEADER.

◆ SdkEvalSpiWriteRegisters()

StatusBytes SdkEvalSpiWriteRegisters ( uint8_t  cRegAddress,
uint8_t  cNbBytes,
uint8_t *  pcBuffer 
)
Parameters
cRegAddressbase register's address to be write
cNbBytesnumber of registers and bytes to be write
pcBufferpointer to the buffer of values have to be written into registers
Return values
Devicestatus

Definition at line 314 of file SDK_EVAL_Spi_Driver.c.

References hal_spim_is_busy(), hal_spim_tx_rx(), and WRITE_HEADER.