add iddle irq

This commit is contained in:
2025-10-27 16:49:16 +03:00
parent 694a8ab793
commit 345ab9df8b
22 changed files with 371 additions and 301 deletions

File diff suppressed because one or more lines are too long

View File

@@ -50,15 +50,25 @@ void MX_GPIO_Init(void)
__HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */ /*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4 HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4
|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8 |GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8
|GPIO_PIN_9|GPIO_PIN_10|One_wire_Pin, GPIO_PIN_SET); |GPIO_PIN_9|Relay_dc5v_Pin|One_wire_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */ /*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10
|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14 |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
|GPIO_PIN_15, GPIO_PIN_SET); |GPIO_PIN_15, GPIO_PIN_RESET);
/*Configure GPIO pin : PC13 */
GPIO_InitStruct.Pin = GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
/*Configure GPIO pin : PA0 */ /*Configure GPIO pin : PA0 */
GPIO_InitStruct.Pin = GPIO_PIN_0; GPIO_InitStruct.Pin = GPIO_PIN_0;
@@ -68,10 +78,10 @@ void MX_GPIO_Init(void)
/*Configure GPIO pins : PA1 PA2 PA3 PA4 /*Configure GPIO pins : PA1 PA2 PA3 PA4
PA5 PA6 PA7 PA8 PA5 PA6 PA7 PA8
PA9 PA10 PAPin */ PA9 Relay_dc5v_Pin One_wire_Pin */
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4 GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4
|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8 |GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8
|GPIO_PIN_9|GPIO_PIN_10|One_wire_Pin; |GPIO_PIN_9|Relay_dc5v_Pin|One_wire_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

View File

@@ -69,6 +69,7 @@ uint8_t ralay_5v_on_var=0;
uint8_t uart_byte = 0; uint8_t uart_byte = 0;
uint8_t first_in=1; uint8_t first_in=1;
DALLAS_SensorHandleTypeDef sens[30]; DALLAS_SensorHandleTypeDef sens[30];
int init_sens=0;
/* USER CODE END PM */ /* USER CODE END PM */
@@ -95,7 +96,6 @@ void SystemClock_Config(void);
* @retval int * @retval int
*/ */
int main(void) int main(void)
{ {
/* USER CODE BEGIN 1 */ /* USER CODE BEGIN 1 */
@@ -121,7 +121,6 @@ int main(void)
/* Initialize all configured peripherals */ /* Initialize all configured peripherals */
MX_GPIO_Init(); MX_GPIO_Init();
MX_TIM1_Init(); MX_TIM1_Init();
MX_USART1_UART_Init(); MX_USART1_UART_Init();
MX_TIM2_Init(); MX_TIM2_Init();
@@ -137,12 +136,12 @@ int main(void)
uint8_t uart_byte = 0; uint8_t uart_byte = 0;
RS_Receive_IT(&hmodbus1, &MODBUS_MSG); RS_Receive_IT(&hmodbus1, &MODBUS_MSG);
Dallas_BusFirstInit(&htim1); Dallas_BusFirstInit(&htim1);
// èíèöèàëèçàöèÿ ïî ïîðÿäêó íàéäåííûõ äàò÷èêîâ // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Èíèöèàëèçàöèÿ ïî èíäåêñó (ïîðÿäêîâîìó íîìåðó íàéäåííîãî äàò÷èêà) // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
for ( int i=0; i<hdallas.onewire->RomCnt;i++) for ( int i=0; i<hdallas.onewire->RomCnt;i++)
{ {
// Èíèöèàëèçàöèÿ ïî ROM-àäðåñó // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> ROM-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//sens[i].Init.init_func = &Dallas_SensorInitByROM; //sens[i].Init.init_func = &Dallas_SensorInitByROM;
// sens[i].Init.InitParam.ROM = rom_address; // sens[i].Init.InitParam.ROM = rom_address;
sens[i].Init.InitParam.Ind = i; sens[i].Init.InitParam.Ind = i;
@@ -159,8 +158,45 @@ int main(void)
/* USER CODE BEGIN WHILE */ /* USER CODE BEGIN WHILE */
while (1) while (1)
{ {
if( hmodbus1.pMessagePtr->Func_Code&ERR_VALUES_START)
{
static int pause_Alarm_led;
while (1)
{
if (pause_Alarm_led>1000000)
{
GPIOC->ODR^=1<<13;
pause_Alarm_led=0;
}
pause_Alarm_led++;
}
}
for(int i=0;i<hdallas.onewire->RomCnt;i++)
if(sens[i].isLost)
{
init_sens=1;
}
if (init_sens)
{
init_sens=0;
//Dallas_BusFirstInit(&htim1);
for ( int i=0; i<hdallas.onewire->RomCnt;i++)
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> ROM-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//sens[i].Init.init_func = &Dallas_SensorInitByROM;
// sens[i].Init.InitParam.ROM = rom_address;
sens[i].Init.InitParam.Ind = i;
sens[i].Init.init_func = &Dallas_SensorInitByInd;
sens[i].Init.Resolution = DALLAS_CONFIG_9_BITS;
MB_DATA.HoldRegs.set_Temp[i] =sens[i].set_temp =20.;
MB_DATA.HoldRegs.set_hyst[i]=sens[i].hyst =1;
Dallas_AddNewSensors(&hdallas, &sens[i]);
}
}
if (_debug_init||MB_DATA.Coils.init_param) if (_debug_init||MB_DATA.Coils.init_param)
{ {
_debug_init=0; _debug_init=0;
@@ -292,7 +328,7 @@ void SystemClock_Config(void)
/* USER CODE BEGIN 4 */ /* USER CODE BEGIN 4 */
void iwdg_refresh(void) void iwdg_refresh(void)
{ {
IWDG->KR = 0xAAAA; // Ñáðîñèòü òàéìåð IWDG->KR = 0xAAAA; // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
} }
void led_blink(GPIO_TypeDef *GPIOx,uint16_t GPIO_Pin,uint8_t iter,uint16_t delay) void led_blink(GPIO_TypeDef *GPIOx,uint16_t GPIO_Pin,uint8_t iter,uint16_t delay)
{ {
@@ -382,7 +418,8 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
/* USER CODE BEGIN Callback 0 */ /* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */ /* USER CODE END Callback 0 */
if (htim->Instance == TIM3) { if (htim->Instance == TIM3)
{
HAL_IncTick(); HAL_IncTick();
} }
/* USER CODE BEGIN Callback 1 */ /* USER CODE BEGIN Callback 1 */
@@ -404,7 +441,6 @@ void Error_Handler(void)
} }
/* USER CODE END Error_Handler_Debug */ /* USER CODE END Error_Handler_Debug */
} }
#ifdef USE_FULL_ASSERT #ifdef USE_FULL_ASSERT
/** /**
* @brief Reports the name of the source file and the source line number * @brief Reports the name of the source file and the source line number

View File

@@ -98,7 +98,7 @@ uint8_t OneWire_Pin_Read(OneWire_t* OW)
#else #else
#ifdef LL_Driver #ifdef LL_Driver
return ((OW->DataPort->IDR & OW->DataPin) != 0x00U) ? 1 : 0; return ((OW->DataPort->IDR & OW->DataPin) != 0x00U) ? 1 : 0;
#else6 #else
return HAL_GPIO_ReadPin(OW->DataPort, OW->DataPin); return HAL_GPIO_ReadPin(OW->DataPort, OW->DataPin);
#endif #endif
#endif #endif

View File

@@ -57,24 +57,23 @@ void MX_RTC_Init(void)
/** Initialize RTC and set the Time and Date /** Initialize RTC and set the Time and Date
*/ */
sTime.Hours = 0x0;
sTime.Minutes = 0x0;
sTime.Seconds = 0x0;
// sTime.Hours = 0x0; if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK)
// sTime.Minutes = 0x0; {
// sTime.Seconds = 0x0; Error_Handler();
}
DateToUpdate.WeekDay = RTC_WEEKDAY_MONDAY;
DateToUpdate.Month = RTC_MONTH_JANUARY;
DateToUpdate.Date = 0x1;
DateToUpdate.Year = 0x0;
// // if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK) if (HAL_RTC_SetDate(&hrtc, &DateToUpdate, RTC_FORMAT_BCD) != HAL_OK)
// { {
// Error_Handler(); Error_Handler();
// } }
// DateToUpdate.WeekDay = RTC_WEEKDAY_MONDAY;
// DateToUpdate.Month = RTC_MONTH_JANUARY;
// DateToUpdate.Date = 0x1;
// DateToUpdate.Year = 0x0;
// if (HAL_RTC_SetDate(&hrtc, &DateToUpdate, RTC_FORMAT_BCD) != HAL_OK)
// {
// Error_Handler();
// }
/* USER CODE BEGIN RTC_Init 2 */ /* USER CODE BEGIN RTC_Init 2 */
/* USER CODE END RTC_Init 2 */ /* USER CODE END RTC_Init 2 */

View File

@@ -44,7 +44,7 @@ void MX_SPI1_Init(void)
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE; hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi1.Init.NSS = SPI_NSS_SOFT; hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE; hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;

View File

@@ -1,4 +1,3 @@
/* USER CODE BEGIN Header */ /* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************

View File

@@ -46,12 +46,15 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
uint32_t uwPrescalerValue = 0U; uint32_t uwPrescalerValue = 0U;
uint32_t pFLatency; uint32_t pFLatency;
HAL_StatusTypeDef status = HAL_OK; HAL_StatusTypeDef status = HAL_OK;
/* Enable TIM3 clock */ /* Enable TIM3 clock */
__HAL_RCC_TIM3_CLK_ENABLE(); __HAL_RCC_TIM3_CLK_ENABLE();
/* Get clock configuration */ /* Get clock configuration */
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency); HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
/* Get APB1 prescaler */ /* Get APB1 prescaler */
uwAPB1Prescaler = clkconfig.APB1CLKDivider; uwAPB1Prescaler = clkconfig.APB1CLKDivider;
/* Compute TIM3 clock */ /* Compute TIM3 clock */
@@ -71,11 +74,10 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
htim3.Instance = TIM3; htim3.Instance = TIM3;
/* Initialize TIMx peripheral as follow: /* Initialize TIMx peripheral as follow:
* Period = [(TIM3CLK/1000) - 1]. to have a (1/1000) s time base.
+ Period = [(TIM3CLK/1000) - 1]. to have a (1/1000) s time base. * Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock. * ClockDivision = 0
+ ClockDivision = 0 * Counter direction = Up
+ Counter direction = Up
*/ */
htim3.Init.Period = (1000000U / 1000U) - 1U; htim3.Init.Period = (1000000U / 1000U) - 1U;
htim3.Init.Prescaler = uwPrescalerValue; htim3.Init.Prescaler = uwPrescalerValue;

View File

@@ -285,7 +285,7 @@ void TIM2_IRQHandler(void)
/* USER CODE END TIM2_IRQn 0 */ /* USER CODE END TIM2_IRQn 0 */
HAL_TIM_IRQHandler(&htim2); HAL_TIM_IRQHandler(&htim2);
/* USER CODE BEGIN TIM2_IRQn 1 */ /* USER CODE BEGIN TIM2_IRQn 1 */
RS_TIM_Handler(&hmodbus1); // RS_TIM_Handler(&hmodbus1);
/* USER CODE END TIM2_IRQn 1 */ /* USER CODE END TIM2_IRQn 1 */
} }
@@ -313,7 +313,11 @@ static uint8_t first_in=1;
void USART1_IRQHandler(void) void USART1_IRQHandler(void)
{ {
/* USER CODE BEGIN USART1_IRQn 0 */ /* USER CODE BEGIN USART1_IRQn 0 */
if (__HAL_UART_GET_FLAG(&huart1, UART_FLAG_IDLE))
{
__HAL_UART_CLEAR_IDLEFLAG(&huart1);
RS_TIM_Handler(&hmodbus1);
}
/* USER CODE END USART1_IRQn 0 */ /* USER CODE END USART1_IRQn 0 */
HAL_UART_IRQHandler(&huart1); HAL_UART_IRQHandler(&huart1);
/* USER CODE BEGIN USART1_IRQn 1 */ /* USER CODE BEGIN USART1_IRQn 1 */

View File

@@ -36,7 +36,7 @@ void MX_USART1_UART_Init(void)
/* USER CODE END USART1_Init 0 */ /* USER CODE END USART1_Init 0 */
/* USER CODE BEGIN USART1_Init 1 */ /* USER CODE BEGIN USART1_Init 1 */
huart1.ReceptionType=HAL_UART_RECEPTION_TOIDLE;
/* USER CODE END USART1_Init 1 */ /* USER CODE END USART1_Init 1 */
huart1.Instance = USART1; huart1.Instance = USART1;
huart1.Init.BaudRate = 115200; huart1.Init.BaudRate = 115200;

View File

@@ -726,7 +726,6 @@ __weak void HAL_UART_MspInit(UART_HandleTypeDef *huart)
/** /**
* @brief UART MSP DeInit. * @brief UART MSP DeInit.
* @param huart Pointer to a UART_HandleTypeDef structure that contains * @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module. * the configuration information for the specified UART module.
* @retval None * @retval None

View File

@@ -0,0 +1,47 @@
[BREAKPOINTS]
ForceImpTypeAny = 0
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
[CFI]
CFISize = 0x00
CFIAddr = 0x00
[CPU]
MonModeVTableAddr = 0xFFFFFFFF
MonModeDebug = 0
MaxNumAPs = 0
LowPowerHandlingMode = 0
OverrideMemMap = 0
AllowSimulation = 1
ScriptFile=""
[FLASH]
RMWThreshold = 0x400
Loaders=""
EraseType = 0x00
CacheExcludeSize = 0x00
CacheExcludeAddr = 0x00
MinNumBytesFlashDL = 0
SkipProgOnCRCMatch = 1
VerifyDownload = 1
AllowCaching = 1
EnableFlashDL = 2
Override = 0
Device="ARM7"
[GENERAL]
MaxNumTransfers = 0x00
WorkRAMSize = 0x00
WorkRAMAddr = 0x00
RAMUsageLimit = 0x00
[SWO]
SWOLogFile=""
[MEM]
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF
[RAM]
VerifyDownload = 0x00
[DYN_MEM_MAP]
NumUserRegion = 0x00

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8"?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd"> <ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion> <SchemaVersion>1.0</SchemaVersion>
@@ -104,16 +104,16 @@
<bSchkAxf>0</bSchkAxf> <bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf> <bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel> <nTsel>6</nTsel>
<sDll></sDll> <sDll />
<sDllPa></sDllPa> <sDllPa />
<sDlgDll></sDlgDll> <sDlgDll />
<sDlgPa></sDlgPa> <sDlgPa />
<sIfile></sIfile> <sIfile />
<tDll></tDll> <tDll />
<tDllPa></tDllPa> <tDllPa />
<tDlgDll></tDlgDll> <tDlgDll />
<tDlgPa></tDlgPa> <tDlgPa />
<tIfile></tIfile> <tIfile />
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon> <pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt> </DebugOpt>
<TargetDriverDllRegistry> <TargetDriverDllRegistry>
@@ -130,7 +130,7 @@
<SetRegEntry> <SetRegEntry>
<Number>0</Number> <Number>0</Number>
<Key>ARMDBGFLAGS</Key> <Key>ARMDBGFLAGS</Key>
<Name></Name> <Name />
</SetRegEntry> </SetRegEntry>
<SetRegEntry> <SetRegEntry>
<Number>0</Number> <Number>0</Number>
@@ -152,7 +152,39 @@
<Bp> <Bp>
<Number>0</Number> <Number>0</Number>
<Type>0</Type> <Type>0</Type>
<LineNumber>302</LineNumber> <LineNumber>168</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>../Core/Src/main.c</Filename>
<ExecCommand />
<Expression />
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>167</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>../Core/Src/main.c</Filename>
<ExecCommand />
<Expression />
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>679</LineNumber>
<EnabledFlag>1</EnabledFlag> <EnabledFlag>1</EnabledFlag>
<Address>0</Address> <Address>0</Address>
<ByteObject>0</ByteObject> <ByteObject>0</ByteObject>
@@ -162,8 +194,40 @@
<BreakByAccess>0</BreakByAccess> <BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount> <BreakIfRCount>0</BreakIfRCount>
<Filename>..\Modbus\modbus.c</Filename> <Filename>..\Modbus\modbus.c</Filename>
<ExecCommand></ExecCommand> <ExecCommand />
<Expression></Expression> <Expression />
</Bp>
<Bp>
<Number>3</Number>
<Type>0</Type>
<LineNumber>165</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>../Core/Src/main.c</Filename>
<ExecCommand />
<Expression />
</Bp>
<Bp>
<Number>4</Number>
<Type>0</Type>
<LineNumber>172</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>../Core/Src/main.c</Filename>
<ExecCommand />
<Expression />
</Bp> </Bp>
</Breakpoint> </Breakpoint>
<WatchWindow1> <WatchWindow1>
@@ -175,7 +239,7 @@
<Ww> <Ww>
<count>1</count> <count>1</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>hdallas</ItemText> <ItemText>hdallas,0x10</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>2</count> <count>2</count>
@@ -220,42 +284,57 @@
<Ww> <Ww>
<count>10</count> <count>10</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>hrtc.Instance,0x0A</ItemText> <ItemText>\\john103C6T6\../Modbus/modbus.c\MB_DATA,0x0A</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>11</count> <count>11</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>\\john103C6T6\../Modbus/modbus.c\MB_DATA,0x0A</ItemText> <ItemText>sTime</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>12</count> <count>12</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>sTime</ItemText> <ItemText>RS_Buffer</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>13</count> <count>13</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>ralay_5v_on_var</ItemText> <ItemText>MODBUS_MSG</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>14</count> <count>14</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>MB_DATA.Coils.coils[1].state_val_bit.state_val_01,0x0A</ItemText> <ItemText>modbus_uart_buff</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>15</count> <count>15</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>RS_Buffer</ItemText> <ItemText>_</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>16</count> <count>16</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>MODBUS_MSG</ItemText> <ItemText>init_sens,0x0A</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>17</count> <count>17</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>modbus_uart_buff</ItemText> <ItemText>sens[i]</ItemText>
</Ww>
<Ww>
<count>18</count>
<WinNumber>1</WinNumber>
<ItemText>sens[0].isLost,0x0A</ItemText>
</Ww>
<Ww>
<count>19</count>
<WinNumber>1</WinNumber>
<ItemText>sens[1].isLost,0x0A</ItemText>
</Ww>
<Ww>
<count>20</count>
<WinNumber>1</WinNumber>
<ItemText>sens[2].isLost,0x0A</ItemText>
</Ww> </Ww>
</WatchWindow1> </WatchWindow1>
<WatchWindow2> <WatchWindow2>
@@ -264,12 +343,17 @@
<WinNumber>2</WinNumber> <WinNumber>2</WinNumber>
<ItemText>resolution</ItemText> <ItemText>resolution</ItemText>
</Ww> </Ww>
<Ww>
<count>1</count>
<WinNumber>2</WinNumber>
<ItemText>init_sens,0x0A</ItemText>
</Ww>
</WatchWindow2> </WatchWindow2>
<MemoryWindow1> <MemoryWindow1>
<Mm> <Mm>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<SubType>0</SubType> <SubType>0</SubType>
<ItemText>0x2000058c</ItemText> <ItemText>0x20000278</ItemText>
<AccSizeX>0</AccSizeX> <AccSizeX>0</AccSizeX>
</Mm> </Mm>
</MemoryWindow1> </MemoryWindow1>
@@ -302,24 +386,20 @@
<newCpu>0</newCpu> <newCpu>0</newCpu>
<uProt>0</uProt> <uProt>0</uProt>
</DebugFlag> </DebugFlag>
<LintExecutable></LintExecutable> <LintExecutable />
<LintConfigFile></LintConfigFile> <LintConfigFile />
<bLintAuto>0</bLintAuto> <bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD> <bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags> <LntExFlags>0</LntExFlags>
<pMisraName></pMisraName> <pMisraName />
<pszMrule></pszMrule> <pszMrule />
<pSingCmds></pSingCmds> <pSingCmds />
<pMultCmds></pMultCmds> <pMultCmds />
<pMisraNamep></pMisraNamep> <pMisraNamep />
<pszMrulep></pszMrulep> <pszMrulep />
<pSingCmdsp></pSingCmdsp> <pSingCmdsp />
<pMultCmdsp></pMultCmdsp> <pMultCmdsp />
<SystemViewers> <SystemViewers>
<Entry>
<Name>System Viewer\BKP</Name>
<WinId>35895</WinId>
</Entry>
<Entry> <Entry>
<Name>System Viewer\GPIOA</Name> <Name>System Viewer\GPIOA</Name>
<WinId>35904</WinId> <WinId>35904</WinId>
@@ -328,34 +408,14 @@
<Name>System Viewer\GPIOB</Name> <Name>System Viewer\GPIOB</Name>
<WinId>35900</WinId> <WinId>35900</WinId>
</Entry> </Entry>
<Entry>
<Name>System Viewer\GPIOC</Name>
<WinId>35896</WinId>
</Entry>
<Entry> <Entry>
<Name>System Viewer\IWDG</Name> <Name>System Viewer\IWDG</Name>
<WinId>35905</WinId> <WinId>35905</WinId>
</Entry> </Entry>
<Entry>
<Name>System Viewer\PWR</Name>
<WinId>35899</WinId>
</Entry>
<Entry>
<Name>System Viewer\RCC</Name>
<WinId>35898</WinId>
</Entry>
<Entry>
<Name>System Viewer\RTC</Name>
<WinId>35897</WinId>
</Entry>
<Entry> <Entry>
<Name>System Viewer\TIM1</Name> <Name>System Viewer\TIM1</Name>
<WinId>35903</WinId> <WinId>35903</WinId>
</Entry> </Entry>
<Entry>
<Name>System Viewer\TIM2</Name>
<WinId>35901</WinId>
</Entry>
<Entry> <Entry>
<Name>System Viewer\USART1</Name> <Name>System Viewer\USART1</Name>
<WinId>35902</WinId> <WinId>35902</WinId>
@@ -473,7 +533,7 @@
<GroupNumber>2</GroupNumber> <GroupNumber>2</GroupNumber>
<FileNumber>8</FileNumber> <FileNumber>8</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>..\Modbus\modbus.c</PathWithFileName> <PathWithFileName>..\Modbus\modbus.c</PathWithFileName>

View File

@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8"?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd"> <Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" noNamespaceSchemaLocation="project_projx.xsd">
<SchemaVersion>2.1</SchemaVersion> <SchemaVersion>2.1</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header> <Header>### uVision Project, (C) Keil Software</Header>
<Targets> <Targets>
<Target> <Target>
<TargetName>john103C6T6</TargetName> <TargetName>john103C6T6</TargetName>
@@ -17,31 +14,31 @@
<TargetCommonOption> <TargetCommonOption>
<Device>STM32F103C6</Device> <Device>STM32F103C6</Device>
<Vendor>STMicroelectronics</Vendor> <Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F1xx_DFP.2.4.1</PackID> <PackID>Keil.STM32F1xx_DFP.2.4.0</PackID>
<PackURL>https://www.keil.com/pack/</PackURL> <PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000-0x200027FF) IROM(0x8000000-0x8007FFF) CLOCK(8000000) CPUTYPE("Cortex-M3") TZ</Cpu> <Cpu>IRAM(0x20000000-0x200027FF) IROM(0x8000000-0x8007FFF) CLOCK(8000000) CPUTYPE("Cortex-M3") TZ</Cpu>
<FlashUtilSpec></FlashUtilSpec> <FlashUtilSpec />
<StartupFile></StartupFile> <StartupFile />
<FlashDriverDll></FlashDriverDll> <FlashDriverDll />
<DeviceId>0</DeviceId> <DeviceId>0</DeviceId>
<RegisterFile></RegisterFile> <RegisterFile />
<MemoryEnv></MemoryEnv> <MemoryEnv />
<Cmp></Cmp> <Cmp />
<Asm></Asm> <Asm />
<Linker></Linker> <Linker />
<OHString></OHString> <OHString />
<InfinionOptionDll></InfinionOptionDll> <InfinionOptionDll />
<SLE66CMisc></SLE66CMisc> <SLE66CMisc />
<SLE66AMisc></SLE66AMisc> <SLE66AMisc />
<SLE66LinkerMisc></SLE66LinkerMisc> <SLE66LinkerMisc />
<SFDFile>$$Device:STM32F103C6$SVD\STM32F103xx.svd</SFDFile> <SFDFile>$$Device:STM32F103C6$SVD\STM32F103xx.svd</SFDFile>
<bCustSvd>0</bCustSvd> <bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv> <UseEnv>0</UseEnv>
<BinPath></BinPath> <BinPath />
<IncludePath></IncludePath> <IncludePath />
<LibPath></LibPath> <LibPath />
<RegisterFilePath></RegisterFilePath> <RegisterFilePath />
<DBRegisterFilePath></DBRegisterFilePath> <DBRegisterFilePath />
<TargetStatus> <TargetStatus>
<Error>0</Error> <Error>0</Error>
<ExitCodeStop>0</ExitCodeStop> <ExitCodeStop>0</ExitCodeStop>
@@ -63,8 +60,8 @@
<BeforeCompile> <BeforeCompile>
<RunUserProg1>0</RunUserProg1> <RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2> <RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name> <UserProg1Name />
<UserProg2Name></UserProg2Name> <UserProg2Name />
<UserProg1Dos16Mode>0</UserProg1Dos16Mode> <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode> <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X> <nStopU1X>0</nStopU1X>
@@ -73,8 +70,8 @@
<BeforeMake> <BeforeMake>
<RunUserProg1>0</RunUserProg1> <RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2> <RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name> <UserProg1Name />
<UserProg2Name></UserProg2Name> <UserProg2Name />
<UserProg1Dos16Mode>0</UserProg1Dos16Mode> <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode> <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopB1X>0</nStopB1X> <nStopB1X>0</nStopB1X>
@@ -83,15 +80,15 @@
<AfterMake> <AfterMake>
<RunUserProg1>0</RunUserProg1> <RunUserProg1>0</RunUserProg1>
<RunUserProg2>1</RunUserProg2> <RunUserProg2>1</RunUserProg2>
<UserProg1Name></UserProg1Name> <UserProg1Name />
<UserProg2Name></UserProg2Name> <UserProg2Name />
<UserProg1Dos16Mode>0</UserProg1Dos16Mode> <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode> <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X> <nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X> <nStopA2X>0</nStopA2X>
</AfterMake> </AfterMake>
<SelectedForBatchBuild>1</SelectedForBatchBuild> <SelectedForBatchBuild>1</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString> <SVCSIdString />
</TargetCommonOption> </TargetCommonOption>
<CommonProperty> <CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler> <UseCPPCompiler>0</UseCPPCompiler>
@@ -105,8 +102,8 @@
<AssembleAssemblyFile>0</AssembleAssemblyFile> <AssembleAssemblyFile>0</AssembleAssemblyFile>
<PublicsOnly>0</PublicsOnly> <PublicsOnly>0</PublicsOnly>
<StopOnExitCode>3</StopOnExitCode> <StopOnExitCode>3</StopOnExitCode>
<CustomArgument></CustomArgument> <CustomArgument />
<IncludeLibraryModules></IncludeLibraryModules> <IncludeLibraryModules />
<ComprImg>0</ComprImg> <ComprImg>0</ComprImg>
</CommonProperty> </CommonProperty>
<DllOption> <DllOption>
@@ -115,7 +112,7 @@
<SimDlgDll>DCM.DLL</SimDlgDll> <SimDlgDll>DCM.DLL</SimDlgDll>
<SimDlgDllArguments>-pCM3</SimDlgDllArguments> <SimDlgDllArguments>-pCM3</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName> <TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments></TargetDllArguments> <TargetDllArguments />
<TargetDlgDll>TCM.DLL</TargetDlgDll> <TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM3</TargetDlgDllArguments> <TargetDlgDllArguments>-pCM3</TargetDlgDllArguments>
</DllOption> </DllOption>
@@ -133,17 +130,17 @@
<UseTargetDll>1</UseTargetDll> <UseTargetDll>1</UseTargetDll>
<UseExternalTool>0</UseExternalTool> <UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent> <RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>0</UpdateFlashBeforeDebugging> <UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability> <Capability>1</Capability>
<DriverSelection>4101</DriverSelection> <DriverSelection>4101</DriverSelection>
</Flash1> </Flash1>
<bUseTDR>1</bUseTDR> <bUseTDR>1</bUseTDR>
<Flash2>STLink\ST-LINKIII-KEIL_SWO.dll</Flash2> <Flash2>STLink\ST-LINKIII-KEIL_SWO.dll</Flash2>
<Flash3>"" ()</Flash3> <Flash3>"" ()</Flash3>
<Flash4></Flash4> <Flash4 />
<pFcarmOut></pFcarmOut> <pFcarmOut />
<pFcarmGrp></pFcarmGrp> <pFcarmGrp />
<pFcArmRoot></pFcArmRoot> <pFcArmRoot />
<FcArmLst>0</FcArmLst> <FcArmLst>0</FcArmLst>
</Utilities> </Utilities>
<TargetArmAds> <TargetArmAds>
@@ -176,7 +173,7 @@
<RvctClst>0</RvctClst> <RvctClst>0</RvctClst>
<GenPPlst>0</GenPPlst> <GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M3"</AdsCpuType> <AdsCpuType>"Cortex-M3"</AdsCpuType>
<RvctDeviceName></RvctDeviceName> <RvctDeviceName />
<mOS>0</mOS> <mOS>0</mOS>
<uocRom>0</uocRom> <uocRom>0</uocRom>
<uocRam>0</uocRam> <uocRam>0</uocRam>
@@ -311,7 +308,7 @@
<Size>0x0</Size> <Size>0x0</Size>
</OCR_RVCT10> </OCR_RVCT10>
</OnChipMemories> </OnChipMemories>
<RvctStartVector></RvctStartVector> <RvctStartVector />
</ArmAdsMisc> </ArmAdsMisc>
<Cads> <Cads>
<interw>1</interw> <interw>1</interw>
@@ -338,9 +335,9 @@
<v6WtE>0</v6WtE> <v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti> <v6Rtti>0</v6Rtti>
<VariousControls> <VariousControls>
<MiscControls></MiscControls> <MiscControls />
<Define>USE_HAL_DRIVER,STM32F103x6</Define> <Define>USE_HAL_DRIVER,STM32F103x6</Define>
<Undefine></Undefine> <Undefine />
<IncludePath>../Core/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy;../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../Drivers/CMSIS/Include;../Modbus</IncludePath> <IncludePath>../Core/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy;../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../Drivers/CMSIS/Include;../Modbus</IncludePath>
</VariousControls> </VariousControls>
</Cads> </Cads>
@@ -356,10 +353,10 @@
<useXO>0</useXO> <useXO>0</useXO>
<ClangAsOpt>1</ClangAsOpt> <ClangAsOpt>1</ClangAsOpt>
<VariousControls> <VariousControls>
<MiscControls></MiscControls> <MiscControls />
<Define></Define> <Define />
<Undefine></Undefine> <Undefine />
<IncludePath></IncludePath> <IncludePath />
</VariousControls> </VariousControls>
</Aads> </Aads>
<LDads> <LDads>
@@ -369,15 +366,15 @@
<noStLib>0</noStLib> <noStLib>0</noStLib>
<RepFail>1</RepFail> <RepFail>1</RepFail>
<useFile>0</useFile> <useFile>0</useFile>
<TextAddressRange></TextAddressRange> <TextAddressRange />
<DataAddressRange></DataAddressRange> <DataAddressRange />
<pXoBase></pXoBase> <pXoBase />
<ScatterFile></ScatterFile> <ScatterFile />
<IncludeLibs></IncludeLibs> <IncludeLibs />
<IncludeLibsPath></IncludeLibsPath> <IncludeLibsPath />
<Misc></Misc> <Misc />
<LinkerInputFile></LinkerInputFile> <LinkerInputFile />
<DisabledWarnings></DisabledWarnings> <DisabledWarnings />
</LDads> </LDads>
</TargetArmAds> </TargetArmAds>
</TargetOption> </TargetOption>
@@ -462,8 +459,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -491,12 +486,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -518,8 +507,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -547,12 +534,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -574,8 +555,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -603,12 +582,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -630,8 +603,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -659,12 +630,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -686,8 +651,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -715,12 +678,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -760,6 +717,16 @@
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c</FilePath> <FilePath>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c</FilePath>
</File> </File>
<File>
<FileName>stm32f1xx_hal_tim.c</FileName>
<FileType>1</FileType>
<FilePath>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c</FilePath>
</File>
<File>
<FileName>stm32f1xx_hal_tim_ex.c</FileName>
<FileType>1</FileType>
<FilePath>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c</FilePath>
</File>
<File> <File>
<FileName>stm32f1xx_hal_adc.c</FileName> <FileName>stm32f1xx_hal_adc.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
@@ -777,8 +744,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -806,12 +771,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -833,8 +792,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -862,12 +819,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -939,8 +890,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -968,12 +917,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -995,8 +938,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -1024,12 +965,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -1051,8 +986,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -1080,12 +1013,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -1107,8 +1034,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -1136,12 +1061,6 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
@@ -1163,8 +1082,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile> <AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly> <PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode> <StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg> <ComprImg>1</ComprImg>
</CommonProperty> </CommonProperty>
<FileArmAds> <FileArmAds>
@@ -1192,26 +1109,10 @@
<v6Lto>2</v6Lto> <v6Lto>2</v6Lto>
<v6WtE>2</v6WtE> <v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti> <v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads> </Cads>
</FileArmAds> </FileArmAds>
</FileOption> </FileOption>
</File> </File>
<File>
<FileName>stm32f1xx_hal_tim.c</FileName>
<FileType>1</FileType>
<FilePath>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c</FilePath>
</File>
<File>
<FileName>stm32f1xx_hal_tim_ex.c</FileName>
<FileType>1</FileType>
<FilePath>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c</FilePath>
</File>
<File> <File>
<FileName>stm32f1xx_hal_uart.c</FileName> <FileName>stm32f1xx_hal_uart.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
@@ -1238,7 +1139,6 @@
</Groups> </Groups>
</Target> </Target>
</Targets> </Targets>
<RTE> <RTE>
<apis /> <apis />
<components> <components>
@@ -1257,7 +1157,6 @@
</components> </components>
<files /> <files />
</RTE> </RTE>
<LayerInfo> <LayerInfo>
<Layers> <Layers>
<Layer> <Layer>
@@ -1266,5 +1165,5 @@
</Layer> </Layer>
</Layers> </Layers>
</LayerInfo> </LayerInfo>
</Project> </Project>

View File

@@ -11,7 +11,7 @@
*************************************************************************/ *************************************************************************/
#ifndef __MODBUS_H_ #ifndef __MODBUS_H_
#define __MODBUS_H_ #define __MODBUS_H_
#define TCP_ModBus //#define TCP_ModBus
#include "modbus_config.h" #include "modbus_config.h"
#include "modbus_data.h" #include "modbus_data.h"
//#include "settings.h" // for modbus settings //#include "settings.h" // for modbus settings

View File

@@ -6,11 +6,15 @@
#ifndef _MODBUS_CONFIG_H_ #ifndef _MODBUS_CONFIG_H_
#define _MODBUS_CONFIG_H_ #define _MODBUS_CONFIG_H_
#include "stm32f1xx_hal.h" #include "stm32f1xx_hal.h"
#include "proj_setup.h"
// MODBUS PARAMS // MODBUS PARAMS
#define MODBUS_DEVICE_ID 1 ///< девайс текущего устройства
#define MODBUS_TIMEOUT 2000 ///< максимальнйы тайтаут MB в тиках таймера
#define MODBUS_DEVICE_ID 1 ///< девайс текущего устройства
#ifdef OldVer
#define MODBUS_TIMEOUT 2000 ///< максимальнйы тайтаут MB в тиках таймера
#else
#define MODBUS_TIMEOUT 0
#endif
// STRING OBJECTS MODBUS // STRING OBJECTS MODBUS
#define MODBUS_VENDOR_NAME "NIO-12" #define MODBUS_VENDOR_NAME "NIO-12"
#define MODBUS_PRODUCT_CODE "" #define MODBUS_PRODUCT_CODE ""

View File

@@ -486,8 +486,19 @@ void RS_UART_Handler(RS_HandleTypeDef *hRS)
*/ */
void RS_TIM_Handler(RS_HandleTypeDef *hRS) void RS_TIM_Handler(RS_HandleTypeDef *hRS)
{ {
// if(hRS->sRS_Timeout)
// HAL_TIM_Base_Stop_IT(hRS->htim);
HAL_TIM_Base_Stop_IT(hRS->htim); HAL_TIM_Base_Stop_IT(hRS->htim);
#ifdef OldVer
RS_Abort(hRS, ABORT_RS); RS_Abort(hRS, ABORT_RS);
#else
RS_Abort(hRS, ABORT_RX);
#endif
RS_Handle_Receive_Start(hRS, hRS->pMessagePtr); RS_Handle_Receive_Start(hRS, hRS->pMessagePtr);
} }

View File

@@ -78,8 +78,8 @@ Mcu.PinsNb=42
Mcu.ThirdPartyNb=0 Mcu.ThirdPartyNb=0
Mcu.UserConstants= Mcu.UserConstants=
Mcu.UserName=STM32F103C6Tx Mcu.UserName=STM32F103C6Tx
MxCube.Version=6.12.0 MxCube.Version=6.15.0
MxDb.Version=DB.6.0.120 MxDb.Version=DB.6.0.150
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.ForceEnableDMAVector=true NVIC.ForceEnableDMAVector=true
@@ -169,8 +169,8 @@ PB8.Mode=I2C
PB8.Signal=I2C1_SCL PB8.Signal=I2C1_SCL
PB9.Mode=I2C PB9.Mode=I2C
PB9.Signal=I2C1_SDA PB9.Signal=I2C1_SDA
PC13-TAMPER-RTC.Mode=RTC OUT PC13-TAMPER-RTC.Locked=true
PC13-TAMPER-RTC.Signal=RTC_OUT PC13-TAMPER-RTC.Signal=GPIO_Output
PD0-OSC_IN.Mode=HSE-External-Oscillator PD0-OSC_IN.Mode=HSE-External-Oscillator
PD0-OSC_IN.Signal=RCC_OSC_IN PD0-OSC_IN.Signal=RCC_OSC_IN
PD1-OSC_OUT.Mode=HSE-External-Oscillator PD1-OSC_OUT.Mode=HSE-External-Oscillator
@@ -178,6 +178,7 @@ PD1-OSC_OUT.Signal=RCC_OSC_OUT
PinOutPanel.RotationAngle=0 PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false ProjectManager.BackupPrevious=false
ProjectManager.CompilerLinker=GCC
ProjectManager.CompilerOptimize=6 ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=true ProjectManager.CoupleFile=true

Submodule labview_john/labview_proj deleted from fcba827e91