Skip to content

Commit f4ce409

Browse files
magp-nordicmasz-nordic
authored andcommitted
applications: sdp: mspi: add setting CNT0 value
Add setting CNT0 value to the one received from APP. Signed-off-by: Magdalena Pastula <[email protected]>
1 parent 1afa49e commit f4ce409

File tree

1 file changed

+2
-5
lines changed
  • applications/sdp/mspi/src

1 file changed

+2
-5
lines changed

applications/sdp/mspi/src/main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#define DATA_PINS_MAX 8
2525
#define VIO_COUNT 11
2626

27-
#define MAX_FREQUENCY 64000000
28-
2927
#define MAX_SHIFT_COUNT 63
3028

3129
#define CE_PIN_UNUSED UINT8_MAX
@@ -177,7 +175,7 @@ static void xfer_execute(nrfe_mspi_xfer_packet_msg_t *xfer_packet)
177175
volatile nrfe_mspi_dev_config_t *device =
178176
&nrfe_mspi_devices[nrfe_mspi_xfer_config_ptr->device_index];
179177

180-
xfer_params.counter_value = 4;
178+
xfer_params.counter_value = device->cnt0_value;
181179
xfer_params.ce_vio = ce_vios[device->ce_index];
182180
xfer_params.ce_hold = nrfe_mspi_xfer_config_ptr->hold_ce;
183181
xfer_params.cpp_mode = device->cpp;
@@ -261,7 +259,7 @@ void prepare_and_read_data(nrfe_mspi_xfer_packet_msg_t *xfer_packet, volatile ui
261259
&nrfe_mspi_devices[nrfe_mspi_xfer_config_ptr->device_index];
262260
nrf_vpr_csr_vio_config_t config;
263261

264-
xfer_params.counter_value = 4;
262+
xfer_params.counter_value = device->cnt0_value;
265263
xfer_params.ce_vio = ce_vios[device->ce_index];
266264
xfer_params.ce_hold = nrfe_mspi_xfer_config_ptr->hold_ce;
267265
xfer_params.ce_polarity = device->ce_polarity;
@@ -400,7 +398,6 @@ static void ep_recv(const void *data, size_t len, void *priv)
400398
NRFX_ASSERT(dev_config->dev_config.cpp <= MSPI_CPP_MODE_3);
401399
NRFX_ASSERT(dev_config->dev_config.ce_index < ce_vios_count);
402400
NRFX_ASSERT(dev_config->dev_config.ce_polarity <= MSPI_CE_ACTIVE_HIGH);
403-
NRFX_ASSERT(dev_config->dev_config.freq <= MAX_FREQUENCY);
404401

405402
nrfe_mspi_devices[dev_config->device_index] = dev_config->dev_config;
406403

0 commit comments

Comments
 (0)