power_mode_switch_s32k144 print function not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

power_mode_switch_s32k144 print function not working

1,363 Views
thailivenkatesh8
Contributor II

 working on low power mode SDK of S32k144 in which print function(print((const char *)MENU_MESSAGE ADD_MESSAGE);) is not working not displaying any messages on putty and as per code i set baudrate as 9600.unable to see any response  and readoptionconsole function is also not executing.is there any problem with this SDK code.Please support this issue to solve the problem.

int main(void)
{
/* Variable used for storing user option */
uint8_t option;
/* Variable used for storing core frequency */
uint32_t frequency;
/* Variable used for status of changing mode */
status_t retV = STATUS_SUCCESS;
/* Buffer for sprintf operations */
char buffer[20];

/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
#ifdef PEX_RTOS_INIT
PEX_RTOS_INIT(); /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of Processor Expert internal initialization. ***/

/* Initialize and configure clocks
* - see clock manager component for details
*/
CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,
g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);

/* Initialize pins
* - See PinSettings component for more info
*/
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);

/* Initialize Power Manager
* - See PowerSettings component for more info
*/
POWER_SYS_Init(&powerConfigsArr, POWER_MANAGER_CONFIG_CNT, &powerStaticCallbacksConfigsArr, POWER_MANAGER_CALLBACK_CNT);

/* Initialize LPUART for host - board configurations */
LPUART_DRV_Init(INST_LPUART1, &lpuart1_State, &lpuart1_InitConfig0);

/* Install hander for Button ISR */
INT_SYS_InstallHandler(PORTC_IRQn, ButtonISR, (isr_t *)0);
/* Enable button port IRQ */
INT_SYS_EnableIRQ(PORTC_IRQn);

/*Board EVB - red led off
Board MB - led 0 off */
PINS_DRV_WritePin(LED_PORT, LED_0, 1);
/*Board EVB - green led on
Board MB - led 1 on */
PINS_DRV_WritePin(LED_PORT, LED_1, 0);

while(1)
{
/* Print menu */

print((const char *)MENU_MESSAGE ADD_MESSAGE);
/* Read user option */
readOptionFromConsole(&option);

/* If the option is valid configure the CPU power mode accordingly */
switch (option)
{
/* HSRUN */
case '1':
/* Set power mode to HSRUN */
retV = POWER_SYS_SetMode(HSRUN, POWER_MANAGER_POLICY_AGREEMENT);
if (retV == STATUS_SUCCESS)
{
print((const char*)"************************ CPU is in HSRUN.\r\n");
print((const char*)"************************ Core frequency: ");
/* Get current core clock frequency */
(void)CLOCK_SYS_GetFreq(CORE_CLOCK, &frequency);
/* Transform the frequency from decimal to string */
sprintf(buffer, "%ld", frequency);
/* Print CPU frequency */
print(buffer);
print((const char*)"[Hz] \r\n");
}

Tags (1)
0 Kudos
7 Replies

1,282 Views
thailivenkatesh8
Contributor II

Hi   Danielmartynek,

                                 Using  S32DS_ARM_v2.2 IDE & S32SDK_S32K1xx_RTM_3.0.0 SDK  driver examples power switch mode .

0 Kudos

1,276 Views
danielmartynek
NXP TechSupport
NXP TechSupport

I just tested the example (RTM 3.0.0), and it works as expected.

danielmartynek_0-1643294672470.png

 

What EVB version do you have?

You should find labels on the board.

Also, please read the maskset number on the MCU package (it should be one of those: 0N77P, 0N47T, 0N57U)

 

Thanks,

BR, Daniel

0 Kudos

1,265 Views
thailivenkatesh8
Contributor II

Hi   Danielmartynek

                                  We are using

                                                        EVB Version: Electronika BMS V 3.0-14S &

                                                        Maskset number on the MCU package:0N57U.

0 Kudos

1,225 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Thank you for the information @thailivenkatesh8,

I can't find any documentation to the board online.

Does it support any USB emulated UART like the NXP S32K144 EVB?

Anyway, if you use the SDK example as it is without any modification, you should see the TX signal at PTC7.

Unless there is something different connected to the pin, which I can't tell as I don't have the schematic of the board.

 

Regards,

Daniel

0 Kudos

1,306 Views
thailivenkatesh8
Contributor II

Hi   Danielmartynek,

                                 I am using Electronika distributor NXP  board ,for EVB at PTC13 SW3 is there  for My board added Switch at PTC15 and used Default SDK without changing the code couldn't executed the print statements and observed no data on TX pin.

in Second case edited code for PTC15 as input and external interrupt as rising edge in this case also print statement is not executed. 

0 Kudos

1,284 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @thailivenkatesh8,

Which version of S32DS IDE and the SDK do you use?

 

Thanks,

BR, Daniel

0 Kudos

1,316 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @thailivenkatesh8,

Can you test the SDK power_switch_S32K144 example as is without any modification?

Just to be sure, do you use an EVB or your own custome board?

Do you select the correct port?

Have you tried with a different terminal emulator?

You can scope the LPUART1_TX pin to see the transmitted data.

Regards,

Daniel

 

0 Kudos