From 9ebc51dff4a46b00fda5adf2f8ca6a8b9c1f86ec Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Wed, 27 Nov 2024 09:41:27 +0100 Subject: [PATCH] applications: sdp: mspi: Add IPC solution to SDP MSPI application Add IPC solution based on icmsg to application for FLPR core to communicate with SDP MSPI driver. Signed-off-by: Jakub Zymelka --- applications/sdp/mspi/sample.yaml | 2 ++ applications/sdp/mspi/src/main.c | 46 +++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/applications/sdp/mspi/sample.yaml b/applications/sdp/mspi/sample.yaml index 9eba8063d713..a3c84c2d6056 100644 --- a/applications/sdp/mspi/sample.yaml +++ b/applications/sdp/mspi/sample.yaml @@ -10,3 +10,5 @@ tests: sysbuild: true platform_allow: nrf54l15dk/nrf54l15/cpuflpr tags: ci_build sysbuild mspi + required_snippets: + - sdp-mspi diff --git a/applications/sdp/mspi/src/main.c b/applications/sdp/mspi/src/main.c index 9ea71600f0ce..d900ebc5604c 100644 --- a/applications/sdp/mspi/src/main.c +++ b/applications/sdp/mspi/src/main.c @@ -110,41 +110,39 @@ void process_packet(const void *data, size_t len) nrfe_mspi_flpr_response_t response; uint8_t opcode = *(uint8_t *)data; - response.opcode = opcode; - switch (opcode) { case NRFE_MSPI_CONFIG_PINS: { - /* TODO: Process pinctrl config data - * nrfe_mspi_pinctrl_soc_pin_t *pins_cfg = (nrfe_mspi_pinctrl_soc_pin_t *)data; - * response.opcode = pins_cfg->opcode; - * - * for (uint8_t i = 0; i < NRFE_MSPI_PINS_MAX; i++) { - * uint32_t psel = NRF_GET_PIN(pins_cfg->pin[i]); - * uint32_t fun = NRF_GET_FUN(pins_cfg->pin[i]); - * NRF_GPIO_Type *reg = nrf_gpio_pin_port_decode(&psel); - * } - */ + nrfe_mspi_pinctrl_soc_pin_t *pins_cfg = (nrfe_mspi_pinctrl_soc_pin_t *)data; + + response.opcode = pins_cfg->opcode; + + for (uint8_t i = 0; i < NRFE_MSPI_PINS_MAX; i++) { + uint32_t psel = NRF_GET_PIN(pins_cfg->pin[i]); + uint32_t fun = NRF_GET_FUN(pins_cfg->pin[i]); + NRF_GPIO_Type *reg = nrf_gpio_pin_port_decode(&psel); + /* TODO: Process pinctrl config data */ + } break; } case NRFE_MSPI_CONFIG_CTRL: { - /* TODO: Process controller config data - * nrfe_mspi_cfg_t *cfg = (nrfe_mspi_cfg_t *)data; - * response.opcode = cfg->opcode; - */ + nrfe_mspi_cfg_t *cfg = (nrfe_mspi_cfg_t *)data; + + response.opcode = cfg->opcode; + /* TODO: Process controller config data */ break; } case NRFE_MSPI_CONFIG_DEV: { - /* TODO: Process device config data - * nrfe_mspi_dev_cfg_t *cfg = (nrfe_mspi_dev_cfg_t *)data; - * response.opcode = cfg->opcode; - */ + nrfe_mspi_dev_cfg_t *cfg = (nrfe_mspi_dev_cfg_t *)data; + + response.opcode = cfg->opcode; + /* TODO: Process device config data */ break; } case NRFE_MSPI_CONFIG_XFER: { - /* TODO: Process xfer config data - * nrfe_mspi_xfer_t *xfer = (nrfe_mspi_xfer_t *)data; - * response.opcode = xfer->opcode; - */ + nrfe_mspi_xfer_t *xfer = (nrfe_mspi_xfer_t *)data; + + response.opcode = xfer->opcode; + /* TODO: Process xfer config data */ break; } case NRFE_MSPI_TX: