SparkFun_Edge_BSP icon indicating copy to clipboard operation
SparkFun_Edge_BSP copied to clipboard

Apollo3 Blue AmbiqSuite Release 2.1.0 Compatibility

Open karma0 opened this issue 6 years ago • 3 comments

The only major change that I'm seeing is that the definition of am_hal_adc_samples_read has changed.

extern uint32_t am_hal_adc_samples_read(void *pHandle, bool bFullSample,
                                       uint32_t *pui32InSampleBuffer,
                                       uint32_t *pui32InOutNumberSamples,
                                       am_hal_adc_sample_t *pui32OutBuffer);

am_hal_adc_samples_read used to be:

extern uint32_t am_hal_adc_samples_read(void *pHandle,
                                       uint32_t *pui32InSampleBuffer,    
                                       uint32_t *pui32InOutNumberSamples,
                                       am_hal_adc_sample_t *pui32OutBuffer);

According to the documentation:

bFullSample          - true to get a full sample including the fractional part.

Only a true or false needs to be passed. Seems like a minor change, and setting this value in the call to am_hal_adc_samples_read in /example1_edge_test/src/tf_adc/tf_adc.c seems to allow everything to build successfully when I try.

karma0 avatar Apr 16 '19 03:04 karma0

Issue #3 is about the firmware loader not getting a response to the Hello request, there aren't any compilation issues. Issue #4 (this issue) is about updating the underlying SDK from v2.0.0 to v2.1.0.

karma0 avatar Apr 16 '19 04:04 karma0

Cool, that's good to know. Have you searched for other differences between the two releases in general or just for the examples that we've included?

oclyke avatar Apr 16 '19 14:04 oclyke

I looked at the diff and there are a lot of adjustments to things that I don't understand. The changelog mentioned some things that may or may not be relevant. Oddly, the changelog did not mention the change to am_hal_adc_samples_read() so I don't trust it as a comprehensive reference.

It's probably important to know that this is the only change likely needed to make example1 work and that I have not looked at any of the other examples.

If I can get code to upload to the device, I will confirm beyond compilation and see if we can get it working for the rest of the examples. Then I could look into submitting a PR. (fingers crossed) If someone actually has flashing working and wants to try it, go for it!

karma0 avatar Apr 16 '19 16:04 karma0