The counter is then read and compered by the OSIF_TimeDelay() function. If the core frequency was divided by 10000, the counter would increment every 100us (OSIF_TimeDelay(1) = 100us). The SysTick description can be found in ARM documentation: Cortex™-M4 Devices Generic User Guide, ...
As ErichS say, or you can use SDK OSIF module , function void OSIF_TimeDelay(const uint32_t delay) . SysTick timer is used in this
//OSIF_TimeDelay(1000);}} ch=0,temp_adcValue=4.998779ch=1,temp_adcValue=1.152344ch=2,temp_adcValue=1.259766 test_s32k144_muti_adc.7z 0 Kudos Reply All forum topics Previous Topic Next Topic 10 Replies 11-27-2023 12:50 AM 2,217 Views Robin_Shen NXP TechSupport Hi alice...
Hi YIN SHI, Would you please make sure that OSIF_TimeDelay function is a 2s delay. If so, please check if you click Generate Processor Expert Code .
(&i2c1_instance, &i2c1_MasterConfig0); LPI2C0->MCR |= LPI2C_MCR_DBGEN_MASK; //MCR value is set to 9 //LPI2C0->MCR &= ~LPI2C_MCR_DBGEN_MASK; //MCR value is set to 1 for(;;){ I2C_MasterSendData(&i2c1_instance, masterTxBuffer, TRANSFER_SIZE, true); OSIF_TimeDelay(50);...
(EDMA_CHN1_NUMBER); // Trigger the DMA to start sending the command EDMA_DRV_TriggerSwRequest(EDMA_CHN0_NUMBER); // Trigger the DMA to start receiving the data OSIF_TimeDelay(100); // mS Delay while (1); /* RTOS startup code */ #ifdef PEX_RTOS_START PEX_RTOS_START(); #endif...
(EDMA_CHN1_NUMBER); // Trigger the DMA to start sending the command EDMA_DRV_TriggerSwRequest(EDMA_CHN0_NUMBER); // Trigger the DMA to start receiving the data OSIF_TimeDelay(100); // mS Delay while (1); /* RTOS startup code */ #ifdef PEX_RTOS_START PEX_RTOS_START(); #endif...
But you don't have to reinitialize the LPIT and its clock every time. If TSOI == 1, the counter stops on a Timer Interrupt flag (MSR[TIFn]) assertion. Just set T_EN at the beginning of the delay function and clear it at the end. Also, you can use the SDK and the OSIF compon...