Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[t18/tx18s] add some delay after turning the internal module on #851

Merged
merged 1 commit into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion radio/src/targets/horus/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,26 @@ uint32_t isBootloaderStart(const uint8_t * buffer);
void SDRAM_Init();

// Pulses driver
#define INTERNAL_MODULE_ON() GPIO_SetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN)
#if defined(RADIO_T18)

// TX18S Workaround (see https://github.com/EdgeTX/edgetx/issues/802):
// Add some delay after turning the internal module ON
// on the T18 / TX18S, as the latter seems to have issues
// with power supply showing instability
//
#define INTERNAL_MODULE_ON() \
do { \
GPIO_SetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN); \
delay_ms(1); \
} while (0)

#else

// Just turn the modue ON for all other targets
#define INTERNAL_MODULE_ON() \
GPIO_SetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN)

#endif

#if defined(INTERNAL_MODULE_PXX1) || defined(INTERNAL_MODULE_PXX2)
#define HARDWARE_INTERNAL_RAS
Expand Down