Seems I've pretty much got the F7 working now. There is still something weird with the ADC not returning the right value.. Also, the screen looks shimmery if viewed from the right angle. I've never noticed it before. Not sure if that's the F7's fault? Saving here so I can try the F4 again to compare.

This commit is contained in:
Michael Colton 2016-05-09 21:49:47 -06:00
parent ac513eaae0
commit acefe9aa46
5 changed files with 98 additions and 52 deletions

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1973458297" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-12953173521901507" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1950335458" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="5998203251556263" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>

View file

@ -162,6 +162,7 @@ extern const Gpio_Pin I2C_SDA;
extern const Gpio_Pin FLIP_FLOP_ENABLE;
extern const Gpio_Pin RED_LED;
extern const Gpio_Pin FIVE_VOLT_REGULATOR_ENABLE;
// extern const Gpio_Pin NC_1;
// extern const Gpio_Pin DAC_SWITCHES;

View file

@ -124,12 +124,14 @@ void initAdc()
void adcGetConversion()
{
HAL_StatusTypeDef result = HAL_ADC_PollForConversion(&AdcHandle1, 10);
result = HAL_ADC_PollForConversion(&AdcHandle2, 10);
result = HAL_ADC_PollForConversion(&AdcHandle3, 10);
HAL_StatusTypeDef result = HAL_ADC_PollForConversion(&AdcHandle1, 100);
result = HAL_ADC_PollForConversion(&AdcHandle2, 100);
result = HAL_ADC_PollForConversion(&AdcHandle3, 100);
if (result == HAL_OK)
{
//while(HAL_ADC_GetState(&AdcHandle1) != HAL_ADC_STATE_REG_EOC);
/* Check if the continous conversion of regular channel is finished */
if(HAL_ADC_GetState(&AdcHandle1) == 0x300 /*HAL_ADC_STATE_REG_EOC*/
&& HAL_ADC_GetState(&AdcHandle2) == 0x300 /*HAL_ADC_STATE_REG_EOC*/

View file

@ -202,6 +202,9 @@ const Gpio_Pin FLIP_FLOP_ENABLE =
const Gpio_Pin RED_LED =
{ GPIOE, GPIO_PIN_13 };
const Gpio_Pin FIVE_VOLT_REGULATOR_ENABLE =
{ GPIOE, GPIO_PIN_2 };
//// timer pins
//const Timer_Pin LED_G =
//{
@ -868,6 +871,13 @@ hal_setupPins (void)
gpioInitStructure.Pull = GPIO_NOPULL;
HAL_GPIO_Init (FLIP_FLOP_ENABLE.port, &gpioInitStructure);
HAL_GPIO_WritePin (FLIP_FLOP_ENABLE.port, TRX_SWITCH.pin, 0);
gpioInitStructure.Pin = FIVE_VOLT_REGULATOR_ENABLE.pin;
gpioInitStructure.Speed = GPIO_SPEED_LOW;
gpioInitStructure.Mode = GPIO_MODE_OUTPUT_PP;
gpioInitStructure.Pull = GPIO_NOPULL;
HAL_GPIO_Init (FIVE_VOLT_REGULATOR_ENABLE.port, &gpioInitStructure);
HAL_GPIO_WritePin (FIVE_VOLT_REGULATOR_ENABLE.port, FIVE_VOLT_REGULATOR_ENABLE.pin, 0);
}
//

View file

@ -1337,8 +1337,11 @@ void updateDisplay(uint8_t force)
displayUpdating = 0;
}
int newWaterFallData = 0;
void drawWaterfall()
{
if(newWaterFallData == 1)
{
static float magnitudes[FFT_SIZE];
static float mags;
static uint8_t waterfallScanLine = 0;
@ -1398,6 +1401,10 @@ void drawWaterfall()
waterfallScanLine++;
if(waterfallScanLine > 119) waterfallScanLine = 0;
Adafruit_ILI9340_setVertialScrollStartAddress((/*119 -*/ waterfallScanLine) /*+ 200*/);
newWaterFallData = 0;
}
}
void fillSamepleWithTone(int tone, float *samples)
@ -1552,6 +1559,7 @@ void processStream()
//blink_led_off();
sampleRun = 0;
newWaterFallData = 1;
}
//clearTimUpdateFlag(&TimHandle4);