Okay! I've got it compiling and largely running on the F7! Still not everything is right, but a lot of it is. I think I am almost there! Maybe I'll get to include the F7 after all :D
This commit is contained in:
parent
a24a6c6b8c
commit
7c84c19d01
5 changed files with 2824 additions and 2879 deletions
|
@ -58,6 +58,8 @@
|
|||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.381389927" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
|
||||
<listOptionValue builtIn="false" value="ARM_MATH_CM7"/>
|
||||
<listOptionValue builtIn="false" value="USE_FULL_ASSERT"/>
|
||||
<listOptionValue builtIn="false" value="TRACE"/>
|
||||
<listOptionValue builtIn="false" value="OS_USE_TRACE_SEMIHOSTING_DEBUG"/>
|
||||
|
@ -77,6 +79,8 @@
|
|||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1053621336" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
|
||||
<listOptionValue builtIn="false" value="ARM_MATH_CM7"/>
|
||||
<listOptionValue builtIn="false" value="USE_FULL_ASSERT"/>
|
||||
<listOptionValue builtIn="false" value="TRACE"/>
|
||||
<listOptionValue builtIn="false" value="OS_USE_TRACE_SEMIHOSTING_DEBUG"/>
|
||||
|
@ -84,6 +88,7 @@
|
|||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="HSE_VALUE=26000000"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.257931292" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.gnu11" valueType="enumerated"/>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.501386123" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.997312951" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||
|
@ -100,6 +105,8 @@
|
|||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics.405829556" name="Do not use thread-safe statics (-fno-threadsafe-statics)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1974386042" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
|
||||
<listOptionValue builtIn="false" value="ARM_MATH_CM7"/>
|
||||
<listOptionValue builtIn="false" value="USE_FULL_ASSERT"/>
|
||||
<listOptionValue builtIn="false" value="TRACE"/>
|
||||
<listOptionValue builtIn="false" value="OS_USE_TRACE_SEMIHOSTING_DEBUG"/>
|
||||
|
@ -213,8 +220,9 @@
|
|||
</tool>
|
||||
</fileInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="Examples" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="DSP_Lib"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry excluding="src/stm32f7-hal/stm32f7xx_ll_usb.c|src/stm32f7-hal/stm32f7xx_ll_sdmmc.c|src/stm32f7-hal/stm32f7xx_ll_fmc.c|src/stm32f7-hal/stm32f7xx_hal_wwdg.c|src/stm32f7-hal/stm32f7xx_hal_tim_ex.c|src/stm32f7-hal/stm32f7xx_hal_sram.c|src/stm32f7-hal/stm32f7xx_hal_spdifrx.c|src/stm32f7-hal/stm32f7xx_hal_smartcard.c|src/stm32f7-hal/stm32f7xx_hal_sdram.c|src/stm32f7-hal/stm32f7xx_hal_sd.c|src/stm32f7-hal/stm32f7xx_hal_sai_ex.c|src/stm32f7-hal/stm32f7xx_hal_sai.c|src/stm32f7-hal/stm32f7xx_hal_rtc_ex.c|src/stm32f7-hal/stm32f7xx_hal_rtc.c|src/stm32f7-hal/stm32f7xx_hal_rng.c|src/stm32f7-hal/stm32f7xx_hal_qspi.c|src/stm32f7-hal/stm32f7xx_hal_pcd_ex.c|src/stm32f7-hal/stm32f7xx_hal_pcd.c|src/stm32f7-hal/stm32f7xx_hal_nor.c|src/stm32f7-hal/stm32f7xx_hal_nand.c|src/stm32f7-hal/stm32f7xx_hal_ltdc.c|src/stm32f7-hal/stm32f7xx_hal_lptim.c|src/stm32f7-hal/stm32f7xx_hal_irda.c|src/stm32f7-hal/stm32f7xx_hal_i2s.c|src/stm32f7-hal/stm32f7xx_hal_i2c_ex.c|src/stm32f7-hal/stm32f7xx_hal_hcd.c|src/stm32f7-hal/stm32f7xx_hal_hash_ex.c|src/stm32f7-hal/stm32f7xx_hal_hash.c|src/stm32f7-hal/stm32f7xx_hal_flash_ex.c|src/stm32f7-hal/stm32f7xx_hal_eth.c|src/stm32f7-hal/stm32f7xx_hal_dma_ex.c|src/stm32f7-hal/stm32f7xx_hal_dma2d.c|src/stm32f7-hal/stm32f7xx_hal_dma.c|src/stm32f7-hal/stm32f7xx_hal_dcmi_ex.c|src/stm32f7-hal/stm32f7xx_hal_dcmi.c|src/stm32f7-hal/stm32f7xx_hal_dac_ex.c|src/stm32f7-hal/stm32f7xx_hal_cryp_ex.c|src/stm32f7-hal/stm32f7xx_hal_cryp.c|src/stm32f7-hal/stm32f7xx_hal_crc.c|src/stm32f7-hal/stm32f7xx_hal_cec.c|src/stm32f7-hal/stm32f7xx_hal_can.c|src/stm32f7-hal/stm32f7xx_hal_adc_ex.c|src/stm32f7-hal/stm32f7xx_hal_msp_template.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="system"/>
|
||||
<entry excluding="src/stm32f7-hal/stm32f7xx_ll_usb.c|src/stm32f7-hal/stm32f7xx_ll_sdmmc.c|src/stm32f7-hal/stm32f7xx_ll_fmc.c|src/stm32f7-hal/stm32f7xx_hal_wwdg.c|src/stm32f7-hal/stm32f7xx_hal_sram.c|src/stm32f7-hal/stm32f7xx_hal_spdifrx.c|src/stm32f7-hal/stm32f7xx_hal_smartcard.c|src/stm32f7-hal/stm32f7xx_hal_sdram.c|src/stm32f7-hal/stm32f7xx_hal_sd.c|src/stm32f7-hal/stm32f7xx_hal_sai_ex.c|src/stm32f7-hal/stm32f7xx_hal_sai.c|src/stm32f7-hal/stm32f7xx_hal_rtc_ex.c|src/stm32f7-hal/stm32f7xx_hal_rtc.c|src/stm32f7-hal/stm32f7xx_hal_rng.c|src/stm32f7-hal/stm32f7xx_hal_qspi.c|src/stm32f7-hal/stm32f7xx_hal_pcd_ex.c|src/stm32f7-hal/stm32f7xx_hal_pcd.c|src/stm32f7-hal/stm32f7xx_hal_nor.c|src/stm32f7-hal/stm32f7xx_hal_nand.c|src/stm32f7-hal/stm32f7xx_hal_ltdc.c|src/stm32f7-hal/stm32f7xx_hal_lptim.c|src/stm32f7-hal/stm32f7xx_hal_irda.c|src/stm32f7-hal/stm32f7xx_hal_i2s.c|src/stm32f7-hal/stm32f7xx_hal_i2c_ex.c|src/stm32f7-hal/stm32f7xx_hal_hcd.c|src/stm32f7-hal/stm32f7xx_hal_hash_ex.c|src/stm32f7-hal/stm32f7xx_hal_hash.c|src/stm32f7-hal/stm32f7xx_hal_flash_ex.c|src/stm32f7-hal/stm32f7xx_hal_eth.c|src/stm32f7-hal/stm32f7xx_hal_dma_ex.c|src/stm32f7-hal/stm32f7xx_hal_dma2d.c|src/stm32f7-hal/stm32f7xx_hal_dma.c|src/stm32f7-hal/stm32f7xx_hal_dcmi_ex.c|src/stm32f7-hal/stm32f7xx_hal_dcmi.c|src/stm32f7-hal/stm32f7xx_hal_dac_ex.c|src/stm32f7-hal/stm32f7xx_hal_cryp_ex.c|src/stm32f7-hal/stm32f7xx_hal_cryp.c|src/stm32f7-hal/stm32f7xx_hal_crc.c|src/stm32f7-hal/stm32f7xx_hal_cec.c|src/stm32f7-hal/stm32f7xx_hal_can.c|src/stm32f7-hal/stm32f7xx_hal_adc_ex.c|src/stm32f7-hal/stm32f7xx_hal_msp_template.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="system"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -35,8 +35,8 @@
|
|||
#endif
|
||||
|
||||
#ifdef PSDR257
|
||||
//#define HSE_VALUE 24000000
|
||||
|
||||
//#define HSE_VALUE 26000000
|
||||
#define ARM_MATH_CM7
|
||||
//#include "stm32f756xx.h"
|
||||
#include "stm32f7xx.h"
|
||||
#include "stm32f7xx_hal_conf.h"
|
||||
|
@ -51,11 +51,12 @@
|
|||
#include "stm32f7xx_hal_uart.h"
|
||||
#include "stm32f7xx_hal_usart.h"
|
||||
#include "stm32f7xx_hal_i2c.h"
|
||||
#include "stm32f7xx_hal_tim_ex.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//#include "core_cmInstr.h"
|
||||
#include "arm_math.h"
|
||||
#include <stdio.h>
|
||||
#include "stddef.h"
|
||||
#include "diag/Trace.h"
|
||||
|
@ -64,27 +65,19 @@
|
|||
#include "dds.h"
|
||||
#include "Timer.h"
|
||||
#include "BlinkLed.h"
|
||||
|
||||
//#include "stm32f4xx_hal_rcc.h"
|
||||
|
||||
#include "Adafruit_GFX.h"
|
||||
#include "Adafruit_ILI9340.h"
|
||||
|
||||
//#include "stm32f4xx_hal.h"
|
||||
|
||||
#include "string.h"
|
||||
#include "math.h"
|
||||
#include "arm_math.h"
|
||||
#include "images.h"
|
||||
#include "i2c.h"
|
||||
//#include "stm32f4xx_hal_rcc.h"
|
||||
//#include "stm32f4xx_hal.h"
|
||||
//#include "stm32f4xx_hal_rtc.h"
|
||||
//#include "stm32f4xx_hal_adc.h"
|
||||
|
||||
|
||||
#include "images.h"
|
||||
|
||||
//#include "misc.h"
|
||||
//#include "stm32f4xx_hal_def.h"
|
||||
|
||||
#include "i2c.h"
|
||||
//#include "core_cmInstr.h"
|
||||
|
||||
|
||||
TIM_HandleTypeDef TimHandle;
|
||||
|
|
|
@ -152,7 +152,7 @@ SystemClock_Config (void)
|
|||
RCC_OscInitStruct.PLL.PLLM = (HSI_VALUE / 1000000u);
|
||||
#endif
|
||||
|
||||
RCC_OscInitStruct.PLL.PLLN = 384; /* 192 MHz */
|
||||
RCC_OscInitStruct.PLL.PLLN = 216; /* 192 MHz */
|
||||
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
|
||||
RCC_OscInitStruct.PLL.PLLQ = 8; /* To make USB work. */
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||
|
|
|
@ -112,10 +112,10 @@ void SystemClock_Config(void)
|
|||
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
|
||||
RCC_OscInitStruct.PLL.PLLM = 15;
|
||||
RCC_OscInitStruct.PLL.PLLN = 210;
|
||||
RCC_OscInitStruct.PLL.PLLM = 13;
|
||||
RCC_OscInitStruct.PLL.PLLN = 216;
|
||||
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
|
||||
RCC_OscInitStruct.PLL.PLLQ = 7;
|
||||
RCC_OscInitStruct.PLL.PLLQ = 9;
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1
|
||||
|
@ -812,7 +812,7 @@ main(int argc, char* argv[])
|
|||
hal_setupPins();
|
||||
spi_init();
|
||||
|
||||
configDMA(&SpiHandle );
|
||||
// configDMA(&SpiHandle );
|
||||
|
||||
|
||||
//I2C_HandleTypeDef hi2c;
|
||||
|
@ -846,8 +846,8 @@ if(HAL_I2C_Init(&handleI2C) != HAL_OK)
|
|||
|
||||
HAL_StatusTypeDef result = HAL_ERROR;
|
||||
|
||||
while(result!= HAL_OK)
|
||||
result = HAL_I2C_IsDeviceReady(&handleI2C, (0x70 << 1), 100, 100); //We need to shift the address to the left for it to work (because of the R/W bit)
|
||||
//while(result!= HAL_OK)
|
||||
// result = HAL_I2C_IsDeviceReady(&handleI2C, (0x70 << 1), 100, 100); //We need to shift the address to the left for it to work (because of the R/W bit)
|
||||
|
||||
//HAL_I2C_Master_Transmit(&hi2c, 230, 0x10, 1, 1000); //write_Si5338(230, 0x10); //OEB_ALL = 1
|
||||
|
||||
|
@ -859,8 +859,8 @@ while(result!= HAL_OK)
|
|||
//HAL_I2C_Master_Transmit(&handleI2C, 230, 0x4F, 1, 1000); //write_Si5338(230, 0x10); //OEB_ALL = 1
|
||||
//HAL_I2C_Master_Transmit(handleI2C, 230, 0x4F, 1, 1000); //write_Si5338(230, 0x10); //OEB_ALL = 1
|
||||
|
||||
i2cSetup();
|
||||
i2cLoop();
|
||||
//i2cSetup();
|
||||
//i2cLoop();
|
||||
|
||||
|
||||
//trace_puts(( == HAL_OK ? "SI5338 Ready" : "SI5338 Not ready"));
|
||||
|
@ -1706,7 +1706,7 @@ uint32_t uwPrescalerValue = 0;
|
|||
TIM_TypeDef timTimBase;
|
||||
//TIM_HandleTypeDef timHandle;
|
||||
/* Definition for TIMx's NVIC */
|
||||
#define TIMx_IRQn 29 //TIM3_IRQn
|
||||
#define TIMx_IRQn TIM3_IRQn //TIM3_IRQn
|
||||
#define TIMx_IRQHandler TIM3_IRQHandler
|
||||
void TIM_Try(void)
|
||||
{
|
||||
|
@ -1716,6 +1716,9 @@ void TIM_Try(void)
|
|||
//NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
|
||||
__TIM3_CLK_ENABLE();
|
||||
|
||||
__HAL_DBGMCU_FREEZE_TIM3();
|
||||
__HAL_DBGMCU_FREEZE_TIM4();
|
||||
|
||||
TimHandle.Instance = TIM3;
|
||||
TimHandle.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
TimHandle.Init.Period = 1050;
|
||||
|
@ -1732,7 +1735,7 @@ void TIM_Try(void)
|
|||
HAL_NVIC_SetPriority(TIMx_IRQn, 0, 1);
|
||||
|
||||
/* Enable the TIMx global Interrupt */
|
||||
HAL_NVIC_EnableIRQ(TIMx_IRQn);
|
||||
HAL_NVIC_EnableIRQ(TIMx_IRQn);
|
||||
|
||||
|
||||
|
||||
|
@ -1752,7 +1755,7 @@ void TIM_Try(void)
|
|||
HAL_NVIC_SetPriority(30 /*TIM4_IRQn*/, 2, 4);
|
||||
|
||||
/* Enable the TIMx global Interrupt */
|
||||
HAL_NVIC_EnableIRQ(30 /*TIM4_IRQn*/);
|
||||
HAL_NVIC_EnableIRQ(TIM4_IRQn);
|
||||
|
||||
|
||||
|
||||
|
@ -1764,6 +1767,16 @@ void TIM_Try(void)
|
|||
|
||||
}
|
||||
|
||||
TIM3_IRQHandler(void)
|
||||
{
|
||||
HAL_TIM_IRQHandler(&TimHandle);
|
||||
}
|
||||
|
||||
TIM4_IRQHandler(void)
|
||||
{
|
||||
HAL_TIM_IRQHandler(&TimHandle4);
|
||||
}
|
||||
|
||||
int ledState = 0;
|
||||
HAL_TIM_PeriodElapsedCallback(htim)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue