This patch adds tables that allow us to decode the Product ID and
Component ID registers. Based on those tables we can decide what probe
function to use. Also this makes it possible for us to understand what
ADIv5 components the target is offering to us, even if we do not
need/use them.
The tables include a comment describing how the register bits need to be
interpreted.
BMPM V2 uses a biasing resistor for the true switch mosfet circuit.
Because of that the weak pull-up/down of the stm32 is not asserting the
correct gate voltage for the mosfets to fully switch through. Because of
that we need to use open drain configulation of the GPIO instead.
- Remove connect_assert_srst global.
- Attach functions always release reset.
- Platforms provide a method to poll the reset pin.
- Reset on scan is all internal to command.c
- Reset is released on a failed scan. Fixes#111
All BMPM2 prototypes after revision a have their LED0 and LED2 inverted.
Because of that we have bumped the hardware revision to swap the LEDs in
software. This is easier than messing up the routing of the LEDs.
If you try to read out the GPIO immediately after setting the weak pull
on the pin it is possible that you will not read the correct value on a
floating pin. We need to use a busy wait loop instead of the
platform_delay because the platform timing is not initialized yet. We
also can not initialize the platform_delay code yet because it requires
LED gpio to be configured. A busy wait seems to do the job and is easier
than refactoring the codebase to use the platform_delay function.
This change has also a practical reason. When flashing and testing the
hardware this change makes it easier to make sure all the LEDs work. Now
when the DFU bootloader is idle it is scanning the LEDs making it easy
to see if one of them has an issue.
In addition to that, the bootloader now indicates when there is data
being flashed using the DFU interface. In cases when one has more than
one device connected and accidently starts flashing a wrong device this
is very useful feature to have.