rom_get_sys_info() function
Get system information Fills a buffer with various system information. Note that this API is also used to return information over the picoboot interface. On success, the buffer is filled, and the number of words filled in the buffer is returned. The information returned is chosen by the flags parameter; the first word in the returned buffer, is the (sub)set of those flags that the API supports. You should always check this value before interpreting the buffer. "Boot Diagnostic" information is intended to help identify the cause of a failed boot, or booting into an unexpected binary. This information can be retrieved via picoboot after a watchdog reboot, however it will not survive a reset via the RUN pin or POWMAN reset. There is only one word of diagnostic information. What it records is based on the pp selection above, which is itself set as a parameter when rebooting programmatically into a normal boot. To get diagnostic info, pp must refer to a slot or an "A" partition; image diagnostics are automatically selected on boot from OTP or RAM image, or when chain_image() is called.) The diagnostic word thus contains data for either slot 0 and slot 1, or the "A" partition (and its "B" partition if it has one). The low half word of the diagnostic word contains information from slot 0 or partition A; the high half word contains information from slot 1 or partition B. To get a full picture of a failed boot involving slots and multiple partitions, the device can be rebooted multiple times to gather the information.
Arguments
out_buffer
buffer to write data to
out_buffer_word_size
size of out_buffer, in words