|
15 | 15 | #include <zephyr/sys/atomic.h> |
16 | 16 | #endif |
17 | 17 | #include <zephyr/logging/log.h> |
18 | | -LOG_MODULE_REGISTER(mspi_nrfe, CONFIG_MSPI_LOG_LEVEL); |
| 18 | +LOG_MODULE_REGISTER(mspi_nrfe, LOG_LEVEL_DBG); |
19 | 19 |
|
20 | 20 | #include <hal/nrf_gpio.h> |
21 | 21 | #include <drivers/mspi/nrfe_mspi.h> |
@@ -183,7 +183,8 @@ static void ipc_recv_clbk(const void *data, size_t len) |
183 | 183 | } |
184 | 184 | } |
185 | 185 |
|
186 | | - LOG_DBG("Received msg with opcode: %d", response->opcode); |
| 186 | + // LOG_DBG("Received msg with opcode: %d", response->opcode); |
| 187 | + LOG_HEXDUMP_DBG((uint8_t *)data, len, "RX IPC data:"); |
187 | 188 | } |
188 | 189 |
|
189 | 190 | /** |
@@ -519,8 +520,10 @@ static int xfer_packet(struct mspi_xfer_packet *packet, uint32_t timeout) |
519 | 520 |
|
520 | 521 | /* Wait for the transfer to complete and receive data. */ |
521 | 522 | if ((packet->dir == MSPI_RX) && (ipc_receive_buffer != NULL) && (ipc_received > 0)) { |
522 | | - memcpy((void *)packet->data_buf, (void *)ipc_receive_buffer, ipc_received); |
523 | | - packet->num_bytes = ipc_received; |
| 523 | + /* Writing to packet->num_bytes causes memory access errors, so for now |
| 524 | + number of received data is stored in the first byte in data buffer. */ |
| 525 | + packet->data_buf[0] = ipc_received; |
| 526 | + memcpy((void *)(packet->data_buf + 1), (void *)ipc_receive_buffer, ipc_received); |
524 | 527 |
|
525 | 528 | /* Clear the receive buffer pointer and size */ |
526 | 529 | ipc_receive_buffer = NULL; |
|
0 commit comments