As you can see in the example output below the first test fails to read the ASIC identity number of the A111.
This generally means that the A111 is not turned on and/or does not have a working SPI connection.
Every other test after this will fail because the MCU can not communicate with the radar.
Acconeer software version v2.5.1 00:00:00.003 (I) (rss): Radar system software activated 00:00:00.011 (E) (cpd_communication_test): ASIC identity test failed. Expected '0x1112', got '0x0000' 00:00:00.021 (E) (cpd_communication_test): Register write-and-read test failed for 3 out of 4 words. 00:00:00.085 (E) (cpd_communication_test): Buffer write-and-read test failed for 384 out of 512 words 00:00:02.105 (E) (sensor_protocol): Timeout waiting for event on sensor 1 00:00:02.111 (I) (sensor_diagnostics): Run_status stopped 0 00:00:02.118 (I) (sensor_diagnostics): WakeupInput[7..0]_wakeup_config: 0 0 0 0 0 0 0 0 00:00:02.126 (I) (sensor_diagnostics): Inputmux_wakeupinput[7..0]_config: 0 0 0 0 0 0 0 0 00:00:02.134 (I) (sensor_diagnostics): Timer[3..0]_wakeup_config: 0 0 0 0 00:00:02.141 (I) (sensor_diagnostics): asic_error_status: 0 00:00:02.146 (I) (sensor_diagnostics): Adc_too_fast: 0, Adc_fifo_full: 0, Spi_missing_ack: 0, Spi_unknown_cmd: 0, Stack_underflow: 0, Stack_overflow: 0 00:00:02.161 (I) (sensor_diagnostics): Stack_level_status_register: 0 00:00:02.167 (I) (sensor_diagnostics): Stack level 0: Addr=0 00:00:02.173 (I) (sensor_diagnostics): Stack level 1: Addr=0 Loop=0 00:00:02.179 (I) (sensor_diagnostics): Stack level 2: Addr=0 Loop=0 00:00:02.185 (I) (sensor_diagnostics): Stack level 3: Addr=0 Loop=0 00:00:02.191 (I) (sensor_diagnostics): Stack level 4: Addr=0 Loop=0 00:00:02.197 (I) (sensor_diagnostics): Stack level 5: Addr=0 Loop=0 00:00:02.203 (I) (sensor_diagnostics): Stack level 6: Addr=0 Loop=0 00:00:02.209 (I) (sensor_diagnostics): Stack level 7: Addr=0 Loop=0 00:00:02.215 (I) (sensor_diagnostics): asic_identity_number: 0, interrupt_status: 0, Scratchpad Config 7: 0 00:00:02.225 (I) (sensor_diagnostics): Wakeup_status0_register: 0 00:00:02.231 (I) (sensor_diagnostics): vco_cbank_config: 0 00:00:02.236 (I) (sensor_diagnostics): pll_config: 0 00:00:02.241 (I) (sensor_diagnostics): Pll_div_config: 0 00:00:02.246 (E) (cpd_interrupt_test): The first interrupt test failed, please check either HW connection or HAL declarations 00:00:02.257 (E) (cpd_communication_test): Interrupt test failed Name: communication_read, result: Fail Name: communication_write_read, result: Fail Name: communication_interrupt, result: Fail Name: supply, result: Fail Name: clock, result: Fail Assembly test: There are failed tests 00:00:02.284 (I) (rss): Radar system software deactivated
Resolve by:
- Verify the acc_hal_integration_x.c file and that the power_on, power_off, transfer functions have been correctly implemented
- Monitor the ENABLE pin and make sure it is set high while running the test
- Monitor SPI_SS, SPI_MOSI, SPI_MISO and make sure the SPI signals look ok
- Monitor VI0 1, 2 and 3 and make sure they have enough supply voltage, 1.8V
To troubleshoot the SPI it might be useful to use the following function that simply reads the ASIC ID:
bool hal_test_spi_read_chipid(void) { const uint32_t sensor = 1; uint8_t buffer[6] = {0x30, 0x0, 0x0, 0x0, 0x0, 0x0}; const acc_hal_t *hal = acc_hal_integration_get_implementation(); hal->sensor_device.power_on(sensor); hal->sensor_device.transfer(sensor, buffer, sizeof(buffer)); hal->sensor_device.power_off(sensor); if(buffer[4] == 0x11 && buffer[5] == 0x12) { printf("Test OK!\n"); return true; } else { printf("Cannot read chip id!\n"); return false; } }
The SPI communication from calling this function should look like the following picture: