Skip to content

Commit

Permalink
SFT-95 Fix SIGLOST error
Browse files Browse the repository at this point in the history
The default behavior of the new boards will disable JTAG and SWDP,
so we had to change the configuration to allow it.
  • Loading branch information
badeniran authored and bill-luu committed Mar 5, 2020
1 parent 56f15a3 commit 9a0dca9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
7 changes: 4 additions & 3 deletions EpsilonLights/Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,12 @@ void SystemClock_Config(void)

/** Initializes the CPU, AHB and APB busses clocks
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV2;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI_DIV2;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL5;

if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
Expand Down
4 changes: 2 additions & 2 deletions EpsilonLights/Core/Src/stm32f1xx_hal_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ void HAL_MspInit(void)
/* PendSV_IRQn interrupt configuration */
HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);

/** DISABLE: JTAG-DP Disabled and SW-DP Disabled
/** NONJTRST: Full SWJ (JTAG-DP + SW-DP) but without NJTRST
*/
__HAL_AFIO_REMAP_SWJ_DISABLE();
__HAL_AFIO_REMAP_SWJ_NONJTRST();

/* USER CODE BEGIN MspInit 1 */

Expand Down
16 changes: 10 additions & 6 deletions EpsilonLights/EpsilonLights.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ Mcu.Pin13=PA14
Mcu.Pin14=PA15
Mcu.Pin15=PB3
Mcu.Pin16=VP_FREERTOS_VS_CMSIS_V1
Mcu.Pin17=VP_SYS_VS_ND
Mcu.Pin18=VP_SYS_VS_tim2
Mcu.Pin17=VP_SYS_VS_tim2
Mcu.Pin2=PA5
Mcu.Pin3=PA6
Mcu.Pin4=PA7
Expand All @@ -40,7 +39,7 @@ Mcu.Pin6=PB11
Mcu.Pin7=PB12
Mcu.Pin8=PB13
Mcu.Pin9=PB14
Mcu.PinsNb=19
Mcu.PinsNb=18
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F103C4Tx
Expand Down Expand Up @@ -70,14 +69,17 @@ PA12.Signal=CAN_TX
PA13.GPIOParameters=GPIO_Label
PA13.GPIO_Label=SWDIO
PA13.Locked=true
PA13.Mode=JTAG_4_pins
PA13.Signal=SYS_JTMS-SWDIO
PA14.GPIOParameters=GPIO_Label
PA14.GPIO_Label=SWCLK
PA14.Locked=true
PA14.Mode=JTAG_4_pins
PA14.Signal=SYS_JTCK-SWCLK
PA15.GPIOParameters=GPIO_Label
PA15.GPIO_Label=JTDI
PA15.Locked=true
PA15.Mode=JTAG_4_pins
PA15.Signal=SYS_JTDI
PA5.GPIOParameters=GPIO_Label
PA5.GPIO_Label=LED_RED
Expand Down Expand Up @@ -114,6 +116,7 @@ PB14.Signal=GPIO_Output
PB3.GPIOParameters=GPIO_Label
PB3.GPIO_Label=SWO
PB3.Locked=true
PB3.Mode=JTAG_4_pins
PB3.Signal=SYS_JTDO-TRACESWO
PCC.Checker=false
PCC.Line=STM32F103
Expand Down Expand Up @@ -170,19 +173,20 @@ RCC.APB2TimFreq_Value=10000000
RCC.FCLKCortexFreq_Value=10000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=10000000
RCC.IPParameters=ADCFreqValue,AHBCLKDivider,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value
RCC.HSEDivPLL=RCC_HSE_PREDIV_DIV2
RCC.IPParameters=ADCFreqValue,AHBCLKDivider,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSEDivPLL,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value,VCOOutput2Freq_Value
RCC.MCOFreq_Value=20000000
RCC.PLLCLKFreq_Value=20000000
RCC.PLLMCOFreq_Value=10000000
RCC.PLLMUL=RCC_PLL_MUL5
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
RCC.SYSCLKFreq_VALUE=20000000
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.TimSysFreq_Value=10000000
RCC.USBFreq_Value=20000000
RCC.VCOOutput2Freq_Value=4000000
VP_FREERTOS_VS_CMSIS_V1.Mode=CMSIS_V1
VP_FREERTOS_VS_CMSIS_V1.Signal=FREERTOS_VS_CMSIS_V1
VP_SYS_VS_ND.Mode=No_Debug
VP_SYS_VS_ND.Signal=SYS_VS_ND
VP_SYS_VS_tim2.Mode=TIM2
VP_SYS_VS_tim2.Signal=SYS_VS_tim2
board=custom
4 changes: 2 additions & 2 deletions EpsilonLights/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##########################################################################################################################
# File automatically-generated by tool: [projectgenerator] version: [3.4.0] date: [Sat Feb 01 10:47:01 MST 2020]
# File automatically-generated by tool: [projectgenerator] version: [3.4.0] date: [Sat Feb 29 13:14:05 MST 2020]
##########################################################################################################################

# ------------------------------------------------
Expand Down Expand Up @@ -114,7 +114,7 @@ AS_DEFS =
# C defines
C_DEFS = \
-DUSE_HAL_DRIVER \
-DSTM32F103x6 \
-DSTM32F103x6
-DUSE_HAL_DRIVER \
-DSTM32F103x6

Expand Down

0 comments on commit 9a0dca9

Please sign in to comment.