Monthly Archives: February 2019

STM32 FatFs / SPIFFS

FatFs

FatFs – Generic FAT Filesystem Module
FAT filesystem on SD card
STM32 and SD card (FATFS and SPI)

STM32F10x

STSW-STM32054 – STM32F10x standard peripheral library
STM32F10x_StdPeriph_Lib_V3.4.0 » Utilities » STM32_EVAL » Common » stm32_eval_sdio_sd.h
SD_CardInfo Struct Reference
SD Card Interface with STM32F0

STM32Cube_FW_F0_V1.9.0\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c

SPIFFS

github.com/pellepl/stm32_spiffs, STM32 target playground for spiffs
github.com/pellepl/spiffs, Wear-leveled SPI flash file system for embedded devices
github.com/jrsharp/spiffs, Wear-leveled SPI flash file system for embedded devices

nRF5 SDK: UART

Understand UART, UARTE and getting it to work with PPI

UART — Universal asynchronous receiver/transmitter
UARTE — Universal asynchronous receiver/transmitter with EasyDMA
Peripheral drivers – UART
Peripheral drivers – UARTE
UART Driver
UART module
Serial port library

nrfx_err_t nrfx_uart_init(nrfx_uart_t const *        p_instance,
                          nrfx_uart_config_t const * p_config,
                          nrfx_uart_event_handler_t  event_handler)
{
    [...]
    apply_config(p_instance, p_config);
    [...]
}

static void apply_config(nrfx_uart_t        const * p_instance,
                         nrfx_uart_config_t const * p_config)
{
    [...]
    /* TXD */
    nrf_gpio_pin_set(p_config->pseltxd);
    nrf_gpio_cfg_output(p_config->pseltxd);
    
    /* RXD */
    nrf_gpio_cfg_input(p_config->pselrxd, NRF_GPIO_PIN_NOPULL);

    nrf_uart_baudrate_set(p_instance->p_reg, p_config->baudrate);
    nrf_uart_configure(p_instance->p_reg, p_config->parity, p_config->hwfc);
    nrf_uart_txrx_pins_set(p_instance->p_reg, p_config->pseltxd, p_config->pselrxd);
    [...]
}
void nrf_uart_txrx_pins_set(
    NRF_UART_Type  *p_reg,
    uint32_t        pseltxd,
    uint32_t        pselrxd
) {
    p_reg->PSELRXD = pselrxd;
    p_reg->PSELTXD = pseltxd;
}