Northeastern-Electric-Racing / Shepherd-BMS

Our from-scratch Battery Management Application
3 stars 0 forks source link

Configure SPI & ADC peripheral #51

Closed dyldonahue closed 8 months ago

dyldonahue commented 11 months ago

Now that the LTC driver, a main driver that relies on SPI, is reconfigured, adjust the SPI configuration on shepherd to work with the LTC driver. To complete this, find refrences to the LTC driver in shepherd, and make any needed adjustments based on the driver. Likely, this will mainly involve passing some parameters into the LTC_Init function, but there are some SPI & ADC settings that should be set in shepherd as well. Within the LTC driver, you will find commented out settings for each of these, we need to apply the same settings on shepherd as had previously been done here

dyldonahue commented 10 months ago

"analogRead" function calls where commented out in various places in compute.c. Im gonna add to this ticket and say re-implement those functions using stm32 hal adc stuff, which should be pretty straightforward once the peripheral i set up correctly

dyldonahue commented 10 months ago

SPI:

ADC:

-remove 5v refrence analog read in compute