How to switch to https://github.com/nrfconnect/sdk-zephyr main branch in ncs/v2.0.2?

After 

west init -m github.com/.../sdk-nrf --mr v2.0.2
west update

I notice ncs/v2.0.2/zephyr has huge difference with github.com/.../sdk-zephyr main

Like there is no 52840 overlay in ncs/v2.0.2/zephyr/sample/driver/adc/board.

I try to delete ncs/v2.0.2/zephyr and git clone https://github.com/nrfconnect/sdk-zephy.

But not working still got message:

=== updating zephyr (zephyr):
Updating files: 100% (10642/10642), done.
HEAD is now at be360e7db2 [nrf fromtree] net: openthread: enable default software tx security in 1.3
WARNING: left behind zephyr branch "main"; to rebase onto the new HEAD:
git -C zephyr rebase be360e7db2db7e1f0e9fcac686a08e62e350bf55 main

How can I switch to sdk-zephyr main?

  • Hello again,

    Wols said:

    But the light_control examle not work for me.
    Here is the erroe message.

    Ah, yes, you can remove all the PWM specific code from the light-controller project, if they are not relevant for your application.
    I primarily meant for the light controller example to be a point of reference for you on how you could use the SAADC in your existing application.
    If you merge the SAADC usage from the light controller example into your existing v2.0.2 application you will not need to make any changes wrt. the devicetree and pin-ctrl module.

    Wols said:
    And in the battery  " ncs/v2.0.2/zephyr/sample/board/nrf/bettery " , when I connect pa0.03 to GND, the console still out put 3V, did I miss some thing?

    The battery example explicitly sets VDD as the input pin for its measurements if no voltage divider circuit is specified.

    Wols said:
    But I am still lookin for the way to read muilt AINx same time

    Like read AIN1 AIN2 in a for loop.

    If you would like to use the SAADC in scan mode (the link is for the nRF52832 documentation, but the same goes for the nRF52840 SAADC peripheral, in this case) you can enable more channels in the channels argument for the adc_sequence.

    Best regards,
    Karl

Related