Skip to content

Commit

Permalink
applications: sdp: mspi: Add IPC solution to SDP MSPI application
Browse files Browse the repository at this point in the history
Add IPC solution based on icmsg to application for FLPR core
to communicate with SDP MSPI driver.

Signed-off-by: Jakub Zymelka <[email protected]>
  • Loading branch information
jaz1-nordic authored and mif1-nordic committed Dec 16, 2024
1 parent 6cfccaf commit 9ebc51d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
2 changes: 2 additions & 0 deletions applications/sdp/mspi/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ tests:
sysbuild: true
platform_allow: nrf54l15dk/nrf54l15/cpuflpr
tags: ci_build sysbuild mspi
required_snippets:
- sdp-mspi
46 changes: 22 additions & 24 deletions applications/sdp/mspi/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9ebc51d

Please sign in to comment.