fix tick per second

This commit is contained in:
acevest
2019-09-26 09:11:31 +08:00
parent 16f3cbb463
commit cfcb853a75
2 changed files with 50 additions and 50 deletions

View File

@@ -33,9 +33,9 @@
#define TOS_CFG_IDLE_TASK_STK_SIZE 512u // 配置TencentOS tiny空闲任务栈大小
#define TOS_CFG_CPU_TICK_PER_SECOND 4000u // 配置TencentOS tiny的tick频率
#define TOS_CFG_CPU_TICK_PER_SECOND 1000u // 配置TencentOS tiny的tick频率
#define TOS_CFG_CPU_CLOCK 108000000 // 配置TencentOS tiny CPU频率
#define TOS_CFG_CPU_CLOCK (108000000/4) // 配置TencentOS tiny CPU频率
#define TOS_CFG_TIMER_AS_PROC 1u // 配置是否将TIMER配置成函数模式

View File

@@ -13,7 +13,7 @@ k_sem_t sem;
void task1(void *pdata)
{
int task_cnt1 = 0;
while(1) {
while (1) {
task_cnt1++;
tos_sem_pend(&sem, ~0U);
gpio_bit_write(GPIOA, GPIO_PIN_7, share % 2);
@@ -23,7 +23,7 @@ void task1(void *pdata)
void task2(void *pdata)
{
int task_cnt2 = 0;
while(1) {
while (1) {
task_cnt2--;
share++;
tos_task_delay(1000);
@@ -52,7 +52,7 @@ void main(void) {
tos_knl_start();
die:
while(1) {
while (1) {
asm("wfi;");
}
}