File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
applications/sdp/mspi/src Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2222
2323#define DEVICES_MAX 5
2424#define DATA_PINS_MAX 8
25- #define VIO_COUNT 11
2625
2726/* Bellow this CNT0 period pin steering force has to be increased to produce correct waveform.
2827 * CNT0 value 1 generates 32MHz clock.
5352
5453BUILD_ASSERT (CONFIG_SDP_MSPI_MAX_RESPONSE_SIZE > 0 , "Response max size should be greater that 0" );
5554
56- static const uint8_t pin_to_vio_map [VIO_COUNT ] = {
55+ static const uint8_t pin_to_vio_map [NRFE_MSPI_PINS_MAX ] = {
5756 4 , /* Physical pin 0 */
5857 0 , /* Physical pin 1 */
5958 1 , /* Physical pin 2 */
@@ -342,7 +341,7 @@ static void config_pins(nrfe_mspi_pinctrl_soc_pin_msg_t *pins_cfg)
342341 xfer_params .tx_direction_mask = 0 ;
343342 xfer_params .rx_direction_mask = 0 ;
344343
345- for (uint8_t i = 0 ; i < NRFE_MSPI_PINS_MAX ; i ++ ) {
344+ for (uint8_t i = 0 ; i < pins_cfg -> pins_count ; i ++ ) {
346345 uint32_t psel = NRF_GET_PIN (pins_cfg -> pin [i ]);
347346 uint32_t fun = NRF_GET_FUN (pins_cfg -> pin [i ]);
348347
@@ -352,7 +351,7 @@ static void config_pins(nrfe_mspi_pinctrl_soc_pin_msg_t *pins_cfg)
352351
353352 uint8_t pin_number = NRF_PIN_NUMBER_TO_PIN (psel );
354353
355- NRFX_ASSERT (pin_number < VIO_COUNT );
354+ NRFX_ASSERT (pin_number < NRFE_MSPI_PINS_MAX );
356355
357356 if ((fun >= NRF_FUN_SDP_MSPI_CS0 ) && (fun <= NRF_FUN_SDP_MSPI_CS4 )) {
358357
Original file line number Diff line number Diff line change @@ -451,6 +451,7 @@ static int api_config(const struct mspi_dt_spec *spec)
451451 mspi_pin_config .pin [i ] = drv_cfg -> pcfg -> states [state_id ].pins [i ];
452452 }
453453 mspi_pin_config .opcode = NRFE_MSPI_CONFIG_PINS ;
454+ mspi_pin_config .pins_count = drv_cfg -> pcfg -> states [state_id ].pin_cnt ;
454455
455456 /* Send pinout configuration to FLPR */
456457 return send_data (NRFE_MSPI_CONFIG_PINS , (const void * )& mspi_pin_config ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ extern "C" {
1616#endif
1717
1818#ifdef CONFIG_SOC_NRF54L15
19- #define NRFE_MSPI_PINS_MAX 6
19+ #define NRFE_MSPI_PINS_MAX 11
2020#else
2121#error "Unsupported SoC for SDP MSPI"
2222#endif
@@ -61,6 +61,7 @@ typedef struct {
6161
6262typedef struct {
6363 nrfe_mspi_opcode_t opcode ; /* NRFE_MSPI_CONFIG_PINS */
64+ uint8_t pins_count ;
6465 pinctrl_soc_pin_t pin [NRFE_MSPI_PINS_MAX ];
6566} nrfe_mspi_pinctrl_soc_pin_msg_t ;
6667
You can’t perform that action at this time.
0 commit comments