Tom, essentially the same happens regardless of the wait mode (other than M4_NoWait). If I specify one of the sleep modes, the code hangs at the statement:
while (_FLD2VAL(CPUSS_CM4_PWR_CTL_PWR_MODE, (*cpussCm4PwrCtlAddr)) == CM4_PWR_STS_RETAINED); (line 3006 of cy_syspm.c).
I also tried using M4_NoWait wait mode. After the first LoRaWAN_Send call, the packet was received by the server and the coreArguments.status.system.isBusy flag eventually became false. After the second call, the coreArguments.status.system.isBusy flag stayed true forever and the packet was never received by the server. Both of these calls returned coreArguments.status.system.errorStatus value of system_ok.
When using M4_NoWait wait mode, the system doesn’t hang, but the third and all subsequent calls to LoRaWAN_Send return coreArguments.status.system.errorStatus value system_BusyError. And of course, only the first packet is received by the server.
At first, I thought there might be a problem with the modules that I am currently using in the lab. However, this problem appears to have surfaced in devices that previously worked fine. While I did update their code, I don’t believe any changes I made had anything to do with the communications.
Just to be sure, I programmed a device with code that was several months old. This new behavior, which never occured before, now occurs even with old code.
I’m dumbfounded and stuck. Any suggestions would be appreciated.