-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot initiate nvs in NRF52840 dongle #83037
Comments
Hi @Saranya-karan! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
Hi @Saranya-karan, this will probably be more a discussion than a bug. In the issue you don't mention what is failing in main. Is it the mounting, or something else ? What error code is returned? |
i really dont know.in build there is no errors.after uploading hex file through programmer tool,i cannot open the uart port in putty(so cannot see the error log). when uploading other code related to BT,GATT..i can open the PORT in putty. i need the guidance..if anyother way to see the errors ...also why my nvs not getting initiated |
the same code i already worked with NRF52833DK, it worked file |
I can't comment on how to debug firmware on the nrf52840 dongle (I don't have such a device). Maybe adding some delay (10s) to the start of main will allow getting print info. Also instead of returning -1 you could stay in main and print the error in the while loop every 2 seconds. |
@Saranya-karan would you be able to bisect this to figure out when your code stopped working? Thanks! |
I don't think it ever worked, the author is referring to a different device. The nrf52480 dongle is a bit of an annoying device as most users will want to use the usb to debug. This takes some time to get up and as the authors code is direct returning on error there might never be anything visible. I think the problem is related to a storage partition that already contains data. Doing a partial erase on these devices might also be a problem. |
The problem is the address of the storage partition. It does not take into account that all addresses on the dongle are 0x1000 shifted because of MBR.
namely the size of slot1_partition was reduced and the start of the storage changed to 0xdb000 |
Referring to the solution by @otzy: I do not think that the default partitioning in the fstab-stock.dtsi is correct in the tree. |
Hello, I have another problem. After I change the optimization level, it does not work again.
But the device works only if I set Is there anything I forgot/missed to change? UPDATE: |
Yeah, When using sdk-nrf, not upstream Zephyr, the Partition Manager may be enabled by default for some of configurations, like building app with MCUboot child image. |
iam new to nrf52840 DONGLE.i want to initiate nvs and read/write in it.
but it kept on failed.my main.c
prj.conf
CONFIG_FLASH=y
CONFIG_LOG=y
CONFIG_UART_CONSOLE=y
CONFIG_CONSOLE=y
CONFIG_PM=y
CONFIG_PM_LOG_LEVEL_DBG=y
CONFIG_NVS=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_REBOOT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_FLASH_MAP=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_CJSON_LIB=y
The text was updated successfully, but these errors were encountered: