add note for max3421e is not signal compatible with pca10056/95

This commit is contained in:
hathach 2024-03-22 11:12:40 +07:00
parent 60764de564
commit 08b09926a4
No known key found for this signature in database
GPG Key ID: 26FAB84F615C3C52
3 changed files with 13 additions and 24 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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);