Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd chip EBYTE_E73 with nrf52840 core fail use SPIFBlockDevice as secondary slot #16

Open
wangleifool opened this issue Jul 20, 2022 · 0 comments

Comments

@wangleifool
Copy link

Hi George,

Thanks for the hard work on this project, it's give me huge help.

It was success on my nrf52840-DK board with FLASHIAP follow your guide,I change to use 3rd chip EBYTE_E73 with nrf52840 core, And try to use SPIFBlockDevice as secondary slot. The SPIFBlockDevice is work fine when mcuboot is not integrated. But after I integrated the MCUboot , SPIFBlockDevice init always return -4002 error code.

Can you give some advice ? thanks very much.

Below is custom_targets.json configure:

{
    "EBYTE_E73": {
        "inherits": [
            "MCU_NRF52840"
        ],
        "detect_code": [
            "1102"
        ],
        "components_add": ["SPIF", "FLASHIAP", "SD"],
        "features_remove": ["CRYPTOCELL310"],
        "macros_remove": ["MBEDTLS_CONFIG_HW_SUPPORT"],
        "config": {
            "enable-objects-extensions": {
                "help": "Enable inclusion of objects_extensions.h",
                "value": false
            },
            "lf_clock_xtal_accuracy": {
                "value": "NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM",
                "macro_name": "MBED_CONF_NORDIC_LF_CLOCK_XTAL_ACCURACY"
            }
        },
        "overrides": {
            "lf_clock_src": "NRF_LF_SRC_RC",
            "lf_clock_rc_calib_timer_interval": 16,
            "lf_clock_rc_calib_mode_config": 0
        },
        "supported_application_profiles": [
            "full", "bare-metal"
        ] 
    }
}

Below is mbed_app.json configure:

{
    "target_overrides": {
        "*": {
            "target.bootloader_img": null,
            "target.printf_lib": "std",
            "target.components_add": ["SD"]
        },
        "EBYTE_E73": {
            "target.mbed_app_start": "0x21000",
            "target.mbed_app_size": "0xBE000"
        }
    }
}

Below is platformio.ini configure:

[env:EBYTE_E73]
platform = nordicnrf52
board = EBYTE_E73
framework = mbed
upload_protocol = jlink
build_flags = 
	-I$PROJECT_SRC_DIR/EBYTE_E73
	-D CONFIG_NFCT_PINS_AS_GPIOS
	-D CONFIG_GPIO_AS_PINRESET
	-D LCD_LCM1602=1
	-D LCD_POWER=1
	-D PIO_FRAMEWORK_MBED_RTOS_PRESENT
	-D NRF_LOG_BACKEND_UART_ENABLED=1
	-D NRF_CLOCK_LF_SRC_XTAL
    -D MCUBOOT_BOOTLOADER_BUILD=0
    -D MCUBOOT_RSA_SIGNATURE_LENGTH=2048
    -D MCUBOOT_PRIMARY_SLOT_START_ADDR="0x20000"
    -D MCUBOOT_SLOT_SIZE="0xC0000"
    -D MCUBOOT_SCRATCH_START_ADDR="0xE0000"
    -D MCUBOOT_SCRATCH_SIZE="0x20000"
    -D MCUBOOT_MAX_IMG_SECTORS="0x180"
    -D MCUBOOT_READ_GRANULARITY=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant