The Neptune development board wakes up from the sleep state and leads to the WAKE pin OpenHarmony

        Recently, I bought several 9.9 yuan Neptune development boards, which can run OpenHarmony. In the officially transplanted version of OpenHarmony1.0, such a lowpower routine is given:

#include <stdio.h>
#include <unistd.h>
#include "cmsis_os2.h"
#include "lowpower.h"
#include "ohos_init.h"

#define LP_TASK_STACK_SIZE 512
#define LP_TASK_PRIO 25

// USE PA0 High level to wakeup
static void* LowpowerTask(const char* arg)
{
    (void)arg;
    static int i = 0;

    printf("enter LowpowerTask\n");

    while (1) {   
        if (i == 0) {
            i++;
            LpcSetType(LIGHT_SLEEP);
        } else
        {
            LpcSetType(DEEP_SLEEP);
        }
        osDelay(500);
    }
}

static void LowpowerExampleEntry(void)
{
    osThreadAttr_t attr;

    LpcInit();

    attr.name = "LowpowerTask";
    attr.attr_bits = 0U;
    attr.cb_mem = NULL;
    attr.cb_size = 0U;
    attr.stack_mem = NULL;
    attr.stack_size = LP_TASK_STACK_SIZE;
    attr.priority = LP_TASK_PRIO;

    if (osThreadNew((osThreadFunc_t)LowpowerTask, NULL, &attr) == NULL) {
        printf("[LowpowerExample] Falied to create LowpowerTask!\n");
    }
}

SYS_RUN(LowpowerExampleEntry); // if test add it

       Here is a comment "// USE PA0 High level to wakeup" telling us to give the PA0 pin a high level to wake up, but I couldn't find the PA0 pin from the silkscreen on the back of the board, so I checked the official principle picture:

        

         It can be seen that the PA0 pin is not led out, so I tried to add a high level to this pin on the board, but it didn't work. After repeated testing many times, I finally came to the conclusion: this pin is not connected to anything.

        Then check the chip manual of w800

        We can see that pin3 is the wakeup pin, that is to say, this chip has a wakeup pin, but why it cannot wake up from PA0, it can be judged here that the wakeup pin is not led to the PA0 pin on the board. .

        So I took off the shielding cover to find out.

        The case was solved, the wakeup pin was suspended, and it was not drawn out at all.

        So try to wake up this pin with a high level.

        At this time, I also found that the pin4 next to it is the reset_n pin, which is kept at a high level in the working state, that is to say, just short-circuit pin3 and pin4. I took a DuPont cable and tried it, and it was successfully awakened.

So, there is still a question that bothers me: why is PA0 empty and wakeup is empty, but the two pins are not connected together? Also ask knowledgeable friends to clarify for me

--------over--------

Guess you like

Origin blog.csdn.net/oyanzhishiyue/article/details/118931109