This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR6843ISK: SPI with IWR6843ISK issues

Part Number: IWR6843ISK
Other Parts Discussed in Thread: MMWAVEICBOOST

Hi everybody!

We work with IWR6843ISK and start writing our code with the TI RTOS. We are working with CCS version 11. 

The idea is that two Evalboards exchange data with each other via SPI. A master exchanges the PCL with the slave via SPI. The two ISK are mounted on two MMWAVEICBOOST
This procedure is described at: e2e.ti.com/.../iwr6843-pinmux-settings-device-coding-for-i2c-spi-usage.
The sources are the somewhat older modified mms_main.c, e.g. as used in OOB Demo.
The slave is running so far, but it has not yet proven that it really works. There was no working master yet.
To get the SPI working, one UART has to be switched off, otherwise there will be a pin conflict (see Pinmux).
After this modification, the sensor runs up to the "Cortex_R4_0] Debug: CLI is operational" without any problems, where it waits for the configuration via UART.
But the sensor can no longer be configured via UART. Therefore, it must be started via a permanently stored configuration in cli.c.
With the original OOB, the sensor starts up normally.

The first configured command is always "sensorStop". In the initialisation phase, the sensor is always in a stopped state, so it cannot be stopped.

However, if this is attempted, it is indicated in mmw_cli.c in the callback function MmwDemo_CLISensorStop prevents this:
static int32_t MmwDemo_CLISensorStop (int32_t argc, char* argv[])
{
if ((gMmwMssMCB.sensorState == MmwDemo_SensorState_STOPPED) ||
(gMmwMssMCB.sensorState == MmwDemo_SensorState_INIT) ||
(gMmwMssMCB.sensorState == MmwDemo_SensorState_OPENED))
{

CLI_write ("Ignored: Sensor is already stopped\n");
return 0;
}

// //______________________Testcode_______________________________
// MmwDemo_resetStaticCfgPendingState();
//
// gMmwMssMCB.sensorState = MmwDemo_SensorState_STOPPED;
//
// return 0;
// //____________________________________________________________


MmwDemo_stopSensor();

MmwDemo_resetStaticCfgPendingState();

gMmwMssMCB.sensorState = MmwDemo_SensorState_STOPPED;
return 0;
}

Although the status gMmwMssMCB.sensorState == MmwDemo_SensorState_INIT is now used, the return 0;

in the IF condition is not triggered and an attempt is made in mms_main.c in void MmwDemo_stopSensor(void) to stop the sensor. which is acknowledged with an error, because the sensor is already stopped.

Error: mmWave Stop failed [Error code: -3101 Subsystem: 0] Erroneous programme counter?

Trying to force a return 0 (see above) does not lead to success but to an error module#9}: "../mmwave_fullcfg.c", line 1317: error {id:0x10000, args:[0x1fccc, 0x1fccc]}

The problem is not only that the SPI does not work, but also the extremely strange behaviour of the software/hardware. Among other things, simple variable assignments in structures do not work.

initCfg.cfgMode = MMWave_ConfigurationMode_FULL;

Responsible for error in mmwave_fullcfg, because after assignment wrong value is in initCfg.cfgMode!

 Possible missing stack, missing heap or unswitched interrups (->PINMUX)? 

The compiler's optimisation setting has also been gradually reduced further and is now completely turned off.

Do you have any information/idea to help us?

Thank you in advance! 

  • Hi,

    So to start with, I would recommend you take a look at the Hard Coded Config lab in the mmWave Industrial Toolbox (link below) this will show you how to add the config into your image, so that you do not need to send it via UART. 

    https://dev.ti.com/tirex/explore/node?a=VLyFKFf__4.12.0&node=AOCveqAva0tvLFgARY.S1w__VLyFKFf__4.12.0

    Since some of the issues you mentioned above are related to the CLI driver, I think it would be best to hardcode your config first, and then evaluate whether you continue to see some of these problems arise. 

    I also want to callout the following SPI limitation which is listed in the mmWave SDK Release Notes, as it may have some impact on your SPI development.

    Let me know if you are able to hard code your config, and what issues you face afterwards.

    Best Regards,
    Alec