Test using _printTaskStackHighWaterMark() function.
This commit is contained in:
parent
d5748a02c1
commit
e59a423d2c
@ -1,5 +1,6 @@
|
||||
#include "EC800M_GPS.h"
|
||||
#include "EC800M_4G.h"
|
||||
#include "common.h"
|
||||
|
||||
int _r = 0;
|
||||
int _timeout = 1;
|
||||
@ -357,6 +358,7 @@ int EC800M_4G_RECV(char *string)
|
||||
|
||||
void EC800M_4G(void *p)
|
||||
{
|
||||
//_printTaskStackHighWaterMark();
|
||||
(void)p;
|
||||
|
||||
EC800M_UART_INIT();
|
||||
@ -375,6 +377,7 @@ void EC800M_4G(void *p)
|
||||
// GPS Module
|
||||
EC800M_GPS(NULL);
|
||||
|
||||
//_printTaskStackHighWaterMark();
|
||||
vTaskDelay(pdMS_TO_TICKS(3000)); // 非阻塞延时
|
||||
}
|
||||
|
||||
|
@ -246,6 +246,7 @@ void EC800M_GPS(void *p)
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
//_printTaskStackHighWaterMark();
|
||||
vTaskDelay(pdMS_TO_TICKS(3000)); // 非阻塞延时
|
||||
//}
|
||||
|
||||
|
@ -91,6 +91,7 @@ void HC_04_UART_READ(void *p)
|
||||
|
||||
void HC_04(void *p)
|
||||
{
|
||||
//_printTaskStackHighWaterMark();
|
||||
(void)p;
|
||||
HC_04_UART_INIT(1);
|
||||
while (1) {
|
||||
@ -98,6 +99,7 @@ void HC_04(void *p)
|
||||
HC_04_UART_READ(NULL);
|
||||
|
||||
printf("\n");
|
||||
//_printTaskStackHighWaterMark();
|
||||
vTaskDelay(pdMS_TO_TICKS(3000)); // 非阻塞延时
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ void read_data(void)
|
||||
void IM1253B(void *p)
|
||||
{
|
||||
(void)p;
|
||||
|
||||
//_printTaskStackHighWaterMark();
|
||||
IM1253B_INIT();
|
||||
while (1) {
|
||||
printf("IM1253B\n");
|
||||
@ -248,7 +248,7 @@ void IM1253B(void *p)
|
||||
|
||||
// 打印处理后的数据
|
||||
//Print_data();
|
||||
|
||||
//_printTaskStackHighWaterMark();
|
||||
vTaskDelay(pdMS_TO_TICKS(3000)); // 非阻塞延时
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "PN532.h"
|
||||
#include "common.h"
|
||||
|
||||
int PN532_INIT(void)
|
||||
{
|
||||
@ -14,6 +15,7 @@ int PN532_INIT(void)
|
||||
|
||||
void PN532(void *p)
|
||||
{
|
||||
_printTaskStackHighWaterMark();
|
||||
(void)p;
|
||||
PN532_INIT();
|
||||
|
||||
@ -64,6 +66,7 @@ void PN532(void *p)
|
||||
printf("UID: 0X%X 0X%X 0X%X 0X%X\r\n", PN532_DATA[14 - 1], PN532_DATA[15 - 1], PN532_DATA[16 - 1], PN532_DATA[17 - 1]);
|
||||
|
||||
printf("\n");
|
||||
_printTaskStackHighWaterMark();
|
||||
vTaskDelay(pdMS_TO_TICKS(3000)); // 非阻塞延时
|
||||
}
|
||||
return;
|
||||
|
@ -26,12 +26,16 @@ void Led_Blinky(void *pvParameters)
|
||||
gpio_init(LED_PIN);
|
||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||
|
||||
//_printTaskStackHighWaterMark();
|
||||
|
||||
while (1) {
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
gpio_put(LED_PIN, 1);
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
gpio_put(LED_PIN, 0);
|
||||
|
||||
//_printTaskStackHighWaterMark();
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,7 +47,7 @@ void Read_Onboard_Temperature(void *pvParameters)
|
||||
adc_set_temp_sensor_enabled(true);
|
||||
adc_select_input(4); // Input 4 is the onboard temperature sensor.
|
||||
|
||||
_printTaskStackHighWaterMark();
|
||||
//_printTaskStackHighWaterMark();
|
||||
|
||||
while (1) {
|
||||
const float conversionFactor = 3.3f / (1 << 12);
|
||||
@ -53,7 +57,7 @@ void Read_Onboard_Temperature(void *pvParameters)
|
||||
|
||||
printf("Onboard temperature %.02f°C %.02f°F\n", tempC, (tempC * 9 / 5 + 32));
|
||||
|
||||
_printTaskStackHighWaterMark();
|
||||
//_printTaskStackHighWaterMark();
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(3000)); // 非阻塞延时
|
||||
}
|
||||
@ -86,7 +90,7 @@ int main(void)
|
||||
{
|
||||
printf("Temperature Task Error!");
|
||||
}
|
||||
/*
|
||||
|
||||
// IM1253B 电压、功率模块
|
||||
xReturned = xTaskCreate(IM1253B, "IM1253B task", 1024, NULL, tskIDLE_PRIORITY, &IM1253B_xHandle);
|
||||
if (xReturned == errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY)
|
||||
@ -114,7 +118,7 @@ int main(void)
|
||||
{
|
||||
printf("HC-04 Task Error!");
|
||||
}
|
||||
*/
|
||||
|
||||
vTaskStartScheduler();
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user