.gitignore | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MDK-ARM/F030C8T6_Test2.uvguix.QuakeGod | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MDK-ARM/F030C8T6_Test2.uvoptx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
MDK-ARM/JLinkLog.txt | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Src/KBus.c | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Src/ModbusRTU.c | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Src/functions.c | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Src/main.c | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.gitignore
@@ -1,7 +1,21 @@ Thumbs.db *.TMP *.lst *.o *.d *.crf *.lnp *.axf *.htm *.build_log.htm *.dep *.iex *.iex *.bin MDK-ARM/F030C8T6_Test2/* MDK-ARM/*.uvguix.* MDK-ARM/*.uvoptx MDK-ARM/JLinkLog.txt *.uvguix.* *.uvgui.* *.uvoptx JLinkLog.txt MDK-ARM/F030C8T6_Test2.uvguix.QuakeGod
@@ -105,8 +105,8 @@ <sActiveDebugView></sActiveDebugView> <WindowPosition> <length>44</length> <flags>2</flags> <showCmd>3</showCmd> <flags>0</flags> <showCmd>1</showCmd> <MinPosition> <xPos>-1</xPos> <yPos>-1</yPos> @@ -149,7 +149,7 @@ </RectRecentDocked> <RectRecentFloat> <Len>16</Len> <Data>F40000006600000090050000F6000000</Data> <Data>F5000000880000009105000018010000</Data> </RectRecentFloat> </Window> <Window> @@ -3621,6 +3621,10 @@ <ContractedFolders></ContractedFolders> <PaneID>0</PaneID> </Doc> </MDIGroup> <MDIGroup> <Size>63</Size> <ActiveTab>0</ActiveTab> <Doc> <Name>../Inc/stm32f0xx_it.h</Name> <ColumnNumber>0</ColumnNumber> MDK-ARM/F030C8T6_Test2.uvoptx
@@ -118,7 +118,9 @@ <SetRegEntry> <Number>0</Number> <Key>DLGUARM</Key> <Name>H榱 `vH榱 </Name> <Name>H榱 `vH榱 </Name> </SetRegEntry> <SetRegEntry> <Number>0</Number> MDK-ARM/JLinkLog.txt
@@ -3,10 +3,10 @@ T16E8 000:156 DLL Compiled: Oct 25 2016 19:31:51 (0002ms, 0029ms total) T16E8 000:156 Logging started @ 2022-10-15 09:00 (0002ms, 0029ms total) T16E8 000:158 JLINK_SetWarnOutHandler(...) (0000ms, 0029ms total) T16E8 000:158 JLINK_OpenEx(...) Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04 Hardware: V7.00 S/N: 20090928 T16E8 000:158 JLINK_OpenEx(...) Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04 Hardware: V7.00 S/N: 20090928 Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFullWEBSRV Webserver running on local port 19080 (0018ms, 0047ms total) T16E8 000:158 returns O.K. (0018ms, 0047ms total) T16E8 000:176 JLINK_SetErrorOutHandler(...) (0000ms, 0047ms total) Src/KBus.c
@@ -399,6 +399,8 @@ break; case cmdExChgData: BufferIn[0]=p1->data[0]; PutOutput(BufferIn[0]); PutOutput(BufferIn[0]); nSlaveTick=p1->data[4]+(p1->data[5]<<8);//+(p1->data[6]<<16)+(p1->data[7]<<24); #if (BOARD_TYPE == 14) // PutOutput(BufferIn[0]); Src/ModbusRTU.c
@@ -86,12 +86,12 @@ int ModBusSlaveCheckPkg(int nChn, void *ptr, uint16_t len1) { if (len1 <=4) return -1; //包长 if (len1 <=4) return -1; //���� pModBusRTUReqPkg pPkg = (pModBusRTUReqPkg) ptr; if (pPkg->Dst >127) return -2; //地址码 if ((pPkg->Cmd&0x7f) > 0x1f) return -3; //功能码 uint16_t crc = crc16tablefast(ptr,len1); //CRC 校验 if (crc != 0 ) return 4; //CRC 校验错误 if (pPkg->Dst >127) return -2; //��ַ�� if ((pPkg->Cmd&0x7f) > 0x1f) return -3; //������ uint16_t crc = crc16tablefast(ptr,len1); //CRC У�� if (crc != 0 ) return 4; //CRC У����� return S_OK; } Src/functions.c
@@ -19,16 +19,16 @@ unsigned int TickPrioduS; // volatile unsigned int nCurTick=0; volatile unsigned int CurTickuS=0; //volatile unsigned int ThisRunTime=0; //开机时间 //volatile unsigned int TotalRunTime=0; //总开机时间 //volatile unsigned int PwrCount=0; //开机次数 unsigned short ClkuS; //每个Clk的nS数, //volatile unsigned int ThisRunTime=0; //����ʱ�� //volatile unsigned int TotalRunTime=0; //�ܿ���ʱ�� //volatile unsigned int PwrCount=0; //�������� unsigned short ClkuS; //ÿ��Clk��nS���� int InituS(int TickFreq1) { TickPrioduS=1000000/TickFreq1; //每个SysTick的微秒数 CoreClkMHz=HAL_RCC_GetHCLKFreq()/1000000; //=SystemCoreClock/1000000;每uS的时钟数 TickPriodClk=SystemCoreClock/TickFreq1; //每个SysTick的时钟数 TickPrioduS=1000000/TickFreq1; //ÿ��SysTick������ CoreClkMHz=HAL_RCC_GetHCLKFreq()/1000000; //=SystemCoreClock/1000000;ÿuS��ʱ���� TickPriodClk=SystemCoreClock/TickFreq1; //ÿ��SysTick��ʱ���� ClkuS=(1000000LL*65536)/SystemCoreClock; CurTickuS=TickPrioduS+100u; return 0; @@ -732,7 +732,7 @@ void Output595_8(unsigned int cc) { //unsigned char i; ;// 74HC595输出程序,输出8位 ;// 74HC595����������8λ // cc=~0x3f; __disable_irq(); STRCLK2_1(); @@ -758,7 +758,7 @@ void Output595_16(unsigned int cc) { //unsigned char i; ;// 74HC595输出程序,输出8位 ;// 74HC595����������8λ // cc=~0x3f; __disable_irq(); STRCLK2_1(); @@ -860,7 +860,7 @@ #if (BOARD_TYPE == 9 || BOARD_TYPE == 10 || BOARD_TYPE == 15 ) //#pragma message("9,10") // V4.2 管脚排列向右移动了一位。 // V4.2 �ܽ����������ƶ���һλ�� #define SRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_1) #define SRCLK1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_1) #define STRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_2) @@ -869,7 +869,7 @@ #define OE1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_10) #define SER1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_11) #define SER1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_11) #else //按照原来的管脚排列 #else //����ԭ���Ĺܽ����� #define SRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_0) #define SRCLK1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_0) #define STRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_1) @@ -890,7 +890,7 @@ void displayInput(unsigned int cc) { //unsigned char i; ;// 74HC595输出程序,输出8位 ;// 74HC595����������8λ // cc=~0x3f; __disable_irq(); STRCLK1_1(); Src/main.c
@@ -66,7 +66,7 @@ /* USER CODE END Includes */ /* Private variables ---------------------------------------------------------*/ #define ADCrefAddr 0x1FFFF7BA /* USER CODE BEGIN PV */ /* Private variables ---------------------------------------------------------*/ @@ -188,9 +188,9 @@ SystemClock_Config(); /* USER CODE BEGIN SysInit */ TickFreq=10000; //Tick频率 TickFreq=10000; //TickƵ�� InituS(TickFreq); // HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/TickFreq); //ÖØж¨ÒåSysTickµÄƵÂÊÎ // HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/TickFreq); //���¶���SysTick��Ƶ��� /* USER CODE END SysInit */