Other Parts Discussed in Thread: SYSCONFIG, CC1312R
Hello friends,
I work with the CC1312R7 mcu using ti-rtos7 and simplelink_cc13xx_cc26xx_sdk_6_20_00_29 SDK. All compiled and flashed via IAR 8.50.9.
I am trying to enter sleep mode but it does not seem to to so.
moreover the current either remains the same or even increases from 0.48mA to 0.7mA.
As for DIOs configuration, other than DIO3 which is used for TX and is defined as output, all other DIOs are defined as inputs with pullup, as follows:
/*DIO1*/ /* CC_GP1_TP */ GPIO_CFG_INPUT | GPIO_CFG_IN_PU | GPIO_CFG_INT_DISABLE,
/*DIO2*/ /* Board_UART_RX */ GPIO_CFG_INPUT | GPIO_CFG_IN_PU | GPIO_CFG_INT_DISABLE,
*/DIO3*/ /* Board_UART_TX */ GPIO_CFG_OUTPUT | GPIO_CFG_OUT_HIGH,
*/*DIO4*/ /* I2C_WP */ GPIO_CFG_INPUT | GPIO_CFG_IN_PU | GPIO_CFG_INT_DISABLE,
*/*DIO5*/ .....
To activate sleep mode, we invoke the below command via DockLight and get an ack in response:
20/03/2023 17:16:24.779 [TX] - 06 A2 00 01 01 AA 0A
20/03/2023 17:16:55.137 [RX] - 05 01 00 00 06 0A [ATE] ACK
The command invokes the below function for entering stand by mode, cancel constraints, close uart interface and enter sleep mode.
void ATE_Io_Enter_Standby_Mode( void )
{
// PowerCC26X2_module.constraintCounts
static Semaphore_Params semParams;
static Semaphore_Struct semStruct;
static Semaphore_Handle semHandle;
//create mutex
Semaphore_Params_init(&semParams);
semParams.mode = Semaphore_Mode_BINARY;
Semaphore_construct(&semStruct, 0, &semParams);
semHandle = Semaphore_handle(&semStruct);
// generate ACK
uint8_t hpr_ack[sizeof(hpr_msg_header_t) + sizeof(hpr_payload_type_e) + sizeof(hpr_msg_payload_ack_t) + sizeof(hpr_msg_footer_t)];
hpr_ack_e response_description = HPR_ACK_MESSAGE_LEGAL;
HPR_PrepareAck((hpr_msg_t_new*)hpr_ack,response_description);
HPR_PrepareMessage((hpr_msg_t_new*)hpr_ack);
// print ACK to UART before close
UART_write(uart.driver_handle, hpr_ack, sizeof(hpr_ack));
// wait a bit...
for( int index = 0; index < 0xFFFF; ++index )
{
asm("nop");
}
// close UART
UART_close(uart.driver_handle);
uint_fast32_t mask = Power_getConstraintMask();
// do the constrains clean more robust
if( mask )
{
for (int index = 0; index < PowerCC26X2_NUMCONSTRAINTS; ++index)
{ // do it for all constrains one after another with checking mask status
do
{ // PowerCC26X2_module.constraintCounts
if( mask & (1 << index) )
{ // when the correcponded bit in the mask is enabled, release
// the constrain, then read and check the mask once more
Power_releaseConstraint( index );
}
mask = Power_getConstraintMask();
}
while( mask & (1 << index) );
}
}
if( !board_isClosedPin( Board_UART_TX ) )
{
board_closePin( Board_UART_TX );
}
if( !board_isClosedPin( Board_UART_RX ) )
{
board_closePin( Board_UART_RX );
}
board_openPin(Board_UART_TX, PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_DIS );
board_openPin(Board_UART_RX, PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_DIS );
sleep(0xFFFFFFFF);
//enter mutex
Semaphore_pend(semHandle, BIOS_WAIT_FOREVER);
return;
}
Assuming all power constraints are removed, what may be the reason for the current consumption not dropping and sleep mode not entering?
The cc1312R7 was flashed with release version and the current consumption remained unchanged even after disconnecting all cables (like uart and J-Link) ,leaving only the power supply.
Note that as far as i know, the function was invoked in the past on CC1312R1 and seemed to have worked.
Thank you.
- Eran