Skip to content

Conversation

@kasjer
Copy link
Contributor

@kasjer kasjer commented May 18, 2024

For both drivers shell code has warning in new compilers

For INA219 voltage calculation was not correct for 32V or 16V range depending on
random bit.

@kasjer kasjer force-pushed the kasjer/ina2xx-fixes branch 2 times, most recently from 216e5ec to d1c2f02 Compare May 18, 2024 15:29
@kasjer
Copy link
Contributor Author

kasjer commented May 18, 2024

Stats indent complain is not worth fixing. Style checker should be updated if anyone can do this.

@kasjer kasjer added the Trivial Trivial fix label May 18, 2024
@kasjer kasjer force-pushed the kasjer/ina2xx-fixes branch from d1c2f02 to 10cdc59 Compare May 21, 2024 16:07
kasjer and others added 3 commits May 21, 2024 18:09
For voltage calculation wrong bit was tested to see if
range is 16 or 32V.

This could resulted in incorrect value being computed
depending if BRNG bit was matching bit from BG.

mcu/pic32: Add minimal boot code

There is special flash area dedicated to bootloader (0xbfc00000-0xbfc0FF00).
Code from this area is execute first.
This is where mcuboot is placed.

It is possible to build application elf that provides minimal
code that jumps to normal flash area dedicated for applications.
The elf generated this way can then easyly be used in MPLAB X ide
instead of command line gdb.

When syscfg has MCU_NO_BOOTLOADER_BUILD set to 1
additional section is generated that goes to bootloader area of MCU.

mcu/pic32: Add minimal boot code

There is special flash area dedicated to bootloader (0xbfc00000-0xbfc0FF00).
Code from this area is execute first.
This is where mcuboot is placed.

It is possible to build application elf that provides minimal
code that jumps to normal flash area dedicated for applications.
The elf generated this way can then easyly be used in MPLAB X ide
instead of command line gdb.

When syscfg has MCU_NO_BOOTLOADER_BUILD set to 1
additional section is generated that goes to bootloader area of MCU.
Warning are false positive but code is changed anyway.
@kasjer kasjer force-pushed the kasjer/ina2xx-fixes branch from 10cdc59 to 6aef91e Compare May 21, 2024 16:09
@kasjer kasjer merged commit 5946fe6 into apache:master May 23, 2024
@kasjer kasjer deleted the kasjer/ina2xx-fixes branch May 23, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Trivial Trivial fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants