mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1265 from kwagyeman/kwabena/flir_init_issues
Make FLIR Lepton init reliably on Pure Thermal
This commit is contained in:
commit
2c5347a77f
@ -272,7 +272,7 @@ int fir_lepton_init(cambus_t *bus, int *w, int *h, int *refresh, int *resolution
|
||||
// Do not put in HAL_SPI_MspInit as other modules share the SPI2/3 bus.
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
GPIO_InitStructure.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStructure.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_MEDIUM;
|
||||
|
||||
@ -312,7 +312,7 @@ int fir_lepton_init(cambus_t *bus, int *w, int *h, int *refresh, int *resolution
|
||||
int period = (tclk / OMV_FIR_LEPTON_MCLK_FREQ) - 1;
|
||||
|
||||
// GPIO_InitTypeDef GPIO_InitStructure;
|
||||
GPIO_InitStructure.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStructure.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_MEDIUM;
|
||||
GPIO_InitStructure.Alternate = OMV_FIR_LEPTON_MCLK_ALT;
|
||||
|
||||
@ -221,6 +221,26 @@ void HAL_MspInit(void)
|
||||
|
||||
#endif // DCMI_RESET_PIN || DCMI_PWDN_PIN || DCMI_FSYNC_PIN
|
||||
|
||||
#if defined(OMV_FIR_LEPTON_RST_PIN_PRESENT)
|
||||
GPIO_InitTypeDef fir_lepton_rst_pin;
|
||||
fir_lepton_rst_pin.Speed = GPIO_SPEED_LOW;
|
||||
fir_lepton_rst_pin.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
fir_lepton_rst_pin.Pin = OMV_FIR_LEPTON_RST_PIN;
|
||||
fir_lepton_rst_pin.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(OMV_FIR_LEPTON_RST_PORT, &fir_lepton_rst_pin);
|
||||
OMV_FIR_LEPTON_RST_LOW();
|
||||
#endif
|
||||
|
||||
#if defined(OMV_FIR_LEPTON_PWDN_PIN_PRESENT)
|
||||
GPIO_InitTypeDef fir_lepton_pwdn_pin;
|
||||
fir_lepton_pwdn_pin.Speed = GPIO_SPEED_LOW;
|
||||
fir_lepton_pwdn_pin.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
fir_lepton_pwdn_pin.Pin = OMV_FIR_LEPTON_PWDN_PIN;
|
||||
fir_lepton_pwdn_pin.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(OMV_FIR_LEPTON_PWDN_PORT, &fir_lepton_pwdn_pin);
|
||||
OMV_FIR_LEPTON_PWDN_LOW();
|
||||
#endif
|
||||
|
||||
#if defined(MCU_SERIES_H7)
|
||||
// This disconnects PA0/PA1 from PA0_C/PA1_C.
|
||||
// PA0_C/PA1_C connect to ADC1/2 Channels P0/P1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user