From 08b09926a4f33d94b15d7e87b88b1b9a14b95388 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 22 Mar 2024 11:12:40 +0700 Subject: [PATCH] add note for max3421e is not signal compatible with pca10056/95 --- hw/bsp/nrf/boards/pca10056/board.h | 11 ++++++----- hw/bsp/nrf/boards/pca10095/board.h | 11 ++++++----- hw/bsp/nrf/family.c | 15 +-------------- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/hw/bsp/nrf/boards/pca10056/board.h b/hw/bsp/nrf/boards/pca10056/board.h index 9459e7911..24d3faa65 100644 --- a/hw/bsp/nrf/boards/pca10056/board.h +++ b/hw/bsp/nrf/boards/pca10056/board.h @@ -46,11 +46,12 @@ #define UART_TX_PIN 6 // SPI for USB host shield -#define MAX3421_SCK_PIN _PINNUM(1, 15) -#define MAX3421_MOSI_PIN _PINNUM(1, 13) -#define MAX3421_MISO_PIN _PINNUM(1, 14) -#define MAX3421_CS_PIN _PINNUM(1, 12) -#define MAX3421_INTR_PIN _PINNUM(1, 11) +// Pin is correct but not working probably due to signal incompatible (1.8V 3v3) with MAC3421E !? +//#define MAX3421_SCK_PIN _PINNUM(1, 15) +//#define MAX3421_MOSI_PIN _PINNUM(1, 13) +//#define MAX3421_MISO_PIN _PINNUM(1, 14) +//#define MAX3421_CS_PIN _PINNUM(1, 12) +//#define MAX3421_INTR_PIN _PINNUM(1, 11) #ifdef __cplusplus } diff --git a/hw/bsp/nrf/boards/pca10095/board.h b/hw/bsp/nrf/boards/pca10095/board.h index 7437dad48..846c2ee5b 100644 --- a/hw/bsp/nrf/boards/pca10095/board.h +++ b/hw/bsp/nrf/boards/pca10095/board.h @@ -46,11 +46,12 @@ #define UART_TX_PIN 20 // SPI for USB host shield -#define MAX3421_SCK_PIN _PINNUM(1, 15) -#define MAX3421_MOSI_PIN _PINNUM(1, 13) -#define MAX3421_MISO_PIN _PINNUM(1, 14) -#define MAX3421_CS_PIN _PINNUM(1, 12) -#define MAX3421_INTR_PIN _PINNUM(1, 11) +// Pin is correct but not working probably due to signal incompatible (1.8V 3v3) with MAC3421E !? +//#define MAX3421_SCK_PIN _PINNUM(1, 15) +//#define MAX3421_MOSI_PIN _PINNUM(1, 13) +//#define MAX3421_MISO_PIN _PINNUM(1, 14) +//#define MAX3421_CS_PIN _PINNUM(1, 12) +//#define MAX3421_INTR_PIN _PINNUM(1, 11) #ifdef __cplusplus } diff --git a/hw/bsp/nrf/family.c b/hw/bsp/nrf/family.c index 55119ef02..71c651f5f 100644 --- a/hw/bsp/nrf/family.c +++ b/hw/bsp/nrf/family.c @@ -292,20 +292,7 @@ void max3421_int_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { } static void max3421_init(void) { - // MAX3421 need 3.3v signal (may not be needed) -// #if defined(UICR_REGOUT0_VOUT_Msk) -// if ((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) != UICR_REGOUT0_VOUT_3V3) { -// NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos; -// while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} -// -// NRF_UICR->REGOUT0 = (NRF_UICR->REGOUT0 & ~UICR_REGOUT0_VOUT_Msk) | UICR_REGOUT0_VOUT_3V3; -// -// NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos; -// while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} -// -// NVIC_SystemReset(); -// } -// #endif + // Somehow pca10056/95 is not working probably due to signal incompatible (1.8V 3v3) with MAC3421E !? // manually manage CS nrf_gpio_cfg_output(MAX3421_CS_PIN);