Added standalone file with type for extID.

This commit is contained in:
Tenocha 2024-11-14 16:04:53 +03:00
parent 3173e999aa
commit e70ed089b2
2 changed files with 62 additions and 229 deletions

View File

@ -0,0 +1,62 @@
#ifndef _new_can_protocol_ID_struct
#define _new_can_protocol_ID_struct
//Route mode
#define ROUTE_MASTER 0
#define ROUTE_SLAVE 1
//Data Types
#define DATA_TYPE_BROADCAST 0b0000
#define DATA_TYPE_DISCRETE 0b0001
#define DATA_TYPE_ANALOG 0b0010
#define DATA_TYPE_MODBUS_COIL 0b0011
#define DATA_TYPE_MODBUS_DISCRETE 0b0100
#define DATA_TYPE_MODBUS_HOLDING 0b0101
#define DATA_TYPE_MODBUS_INPUT 0b0110
#define DATA_TYPE_ERROR 0b0111
#define DATA_TYPE_PULSE 0b1111
//Sensor Types for DATA_TYPE_BROADCAST
#define SENSOR_TYPE_BROADCAST_STATUS 0b00000
#define SENSOR_TYPE_BROADCAST_ONOFF 0b00001
#define SENSOR_TYPE_BROADCAST_RESTARTDEVICE 0b00010
#define SENSOR_TYPE_BROADCAST_RTCSETUP 0b00011
//Sensor Types for DATA_TYPE_DISCRETE
#define SENSOR_TYPE_DISCRETE_ACCIDENT 0b00000
#define SENSOR_TYPE_DISCRETE_WARNING 0b00001
#define SENSOR_TYPE_DISCRETE_CONTROL_SIGNALS 0b00010
#define SENSOR_TYPE_DISCRETE_FLAGS 0b00011
#define SENSOR_TYPE_DISCRETE_RESET 0b00100
#define SENSOR_TYPE_DISCRETE_CHANGE_MODE 0b00101
#define SENSOR_TYPE_DISCRETE_REQUEST_LIST_OF_PARAMETERS 0b00110
//Sensor Types for DATA_TYPE_ANALOG
#define SENSOR_TYPE_ANALOG_UNIVERSAL 0b00000
#define SENSOR_TYPE_ANALOG_USTAVKI 0b00001
#define SENSOR_TYPE_ANALOG_U 0b00010
#define SENSOR_TYPE_ANALOG_I 0b00011
#define SENSOR_TYPE_ANALOG_T 0b00100
//Error Code
#define NONEXISTENT_ELEMENT 0x01
typedef union _extID{
struct extID_Standard_Fields{
unsigned DeviceID:8;
unsigned SensorID:11;
unsigned SensorType:5;
unsigned DataType:4;
unsigned Route:1;
}StandardFields;
struct extID_Modbus_Fields{
unsigned DeviceID:8;
unsigned CountReg:8;
unsigned StrAdr:8;
unsigned DataType:4;
unsigned Route:1;
}ModbusFields;
unsigned int BitAll:29;
}extID;
#endif

View File

@ -1,229 +0,0 @@
#MicroXplorer Configuration settings - do not modify
CAD.formats=
CAD.pinconfig=
CAD.provider=
CAN.ABOM=ENABLE
CAN.BS1=CAN_BS1_13TQ
CAN.BS2=CAN_BS2_2TQ
CAN.CalculateBaudRate=50000
CAN.CalculateTimeBit=20000
CAN.CalculateTimeQuantum=1250.0
CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,Prescaler,BS2,BS1,SJW,ABOM,TXFP,Mode
CAN.Mode=CAN_MODE_LOOPBACK
CAN.Prescaler=40
CAN.SJW=CAN_SJW_1TQ
CAN.TXFP=ENABLE
Dma.Request0=SDIO
Dma.Request1=USART3_RX
Dma.RequestsNb=2
Dma.SDIO.0.Direction=DMA_PERIPH_TO_MEMORY
Dma.SDIO.0.Instance=DMA2_Channel4
Dma.SDIO.0.MemDataAlignment=DMA_MDATAALIGN_WORD
Dma.SDIO.0.MemInc=DMA_MINC_ENABLE
Dma.SDIO.0.Mode=DMA_NORMAL
Dma.SDIO.0.PeriphDataAlignment=DMA_PDATAALIGN_WORD
Dma.SDIO.0.PeriphInc=DMA_PINC_DISABLE
Dma.SDIO.0.Priority=DMA_PRIORITY_LOW
Dma.SDIO.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
Dma.USART3_RX.1.Direction=DMA_PERIPH_TO_MEMORY
Dma.USART3_RX.1.Instance=DMA1_Channel3
Dma.USART3_RX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
Dma.USART3_RX.1.MemInc=DMA_MINC_ENABLE
Dma.USART3_RX.1.Mode=DMA_CIRCULAR
Dma.USART3_RX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
Dma.USART3_RX.1.PeriphInc=DMA_PINC_DISABLE
Dma.USART3_RX.1.Priority=DMA_PRIORITY_LOW
Dma.USART3_RX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
FATFS.BSP.number=1
FATFS.IPParameters=_MAX_SS
FATFS._MAX_SS=4096
FATFS0.BSP.STBoard=false
FATFS0.BSP.api=Unknown
FATFS0.BSP.component=
FATFS0.BSP.condition=
FATFS0.BSP.instance=PB5
FATFS0.BSP.ip=GPIO
FATFS0.BSP.mode=Input
FATFS0.BSP.name=Detect_SDIO
FATFS0.BSP.semaphore=
FATFS0.BSP.solution=PB5
File.Version=6
GPIO.groupedBy=Group By Peripherals
KeepUserPlacement=false
Mcu.CPN=STM32F103RGT7
Mcu.Family=STM32F1
Mcu.IP0=CAN
Mcu.IP1=DMA
Mcu.IP2=FATFS
Mcu.IP3=NVIC
Mcu.IP4=RCC
Mcu.IP5=RTC
Mcu.IP6=SDIO
Mcu.IP7=SYS
Mcu.IP8=TIM7
Mcu.IP9=USART3
Mcu.IPNb=10
Mcu.Name=STM32F103R(F-G)Tx
Mcu.Package=LQFP64
Mcu.Pin0=PB10
Mcu.Pin1=PB11
Mcu.Pin10=PA12
Mcu.Pin11=PC10
Mcu.Pin12=PC11
Mcu.Pin13=PC12
Mcu.Pin14=PD2
Mcu.Pin15=PB5
Mcu.Pin16=VP_FATFS_VS_SDIO
Mcu.Pin17=VP_RTC_VS_RTC_Activate
Mcu.Pin18=VP_RTC_VS_RTC_Calendar
Mcu.Pin19=VP_SYS_VS_ND
Mcu.Pin2=PB12
Mcu.Pin20=VP_SYS_VS_tim8
Mcu.Pin21=VP_TIM7_VS_ClockSourceINT
Mcu.Pin3=PB13
Mcu.Pin4=PB14
Mcu.Pin5=PB15
Mcu.Pin6=PC8
Mcu.Pin7=PC9
Mcu.Pin8=PA8
Mcu.Pin9=PA11
Mcu.PinsNb=22
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F103RGTx
MxCube.Version=6.8.0
MxDb.Version=DB.6.0.80
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.CAN1_SCE_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.DMA1_Channel3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DMA2_Channel4_5_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false
NVIC.TIM7_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.TIM8_UP_TIM13_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:true
NVIC.TimeBase=TIM8_UP_TIM13_IRQn
NVIC.TimeBaseIP=TIM8
NVIC.USART3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.USB_HP_CAN1_TX_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.USB_LP_CAN1_RX0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
PA11.Locked=true
PA11.Mode=CAN_Activate
PA11.Signal=CAN_RX
PA12.Locked=true
PA12.Mode=CAN_Activate
PA12.Signal=CAN_TX
PA8.Mode=Clock-out
PA8.Signal=RCC_MCO
PB10.Mode=Asynchronous
PB10.Signal=USART3_TX
PB11.Mode=Asynchronous
PB11.Signal=USART3_RX
PB12.Locked=true
PB12.Signal=GPIO_Output
PB13.Locked=true
PB13.Signal=GPIO_Output
PB14.Locked=true
PB14.Signal=GPIO_Output
PB15.Locked=true
PB15.Signal=GPIO_Output
PB5.Locked=true
PB5.Signal=GPIO_Input
PC10.Mode=SD_4_bits_Wide_bus
PC10.Signal=SDIO_D2
PC11.Mode=SD_4_bits_Wide_bus
PC11.Signal=SDIO_D3
PC12.Mode=SD_4_bits_Wide_bus
PC12.Signal=SDIO_CK
PC8.Mode=SD_4_bits_Wide_bus
PC8.Signal=SDIO_D0
PC9.Mode=SD_4_bits_Wide_bus
PC9.Signal=SDIO_D1
PD2.Mode=SD_4_bits_Wide_bus
PD2.Signal=SDIO_CMD
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=true
ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32F103RGTx
ProjectManager.FirmwarePackage=STM32Cube FW_F1 V1.8.4
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=false
ProjectManager.LibraryCopy=1
ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=stm32f103rgtx_bootloader.ioc
ProjectManager.ProjectName=stm32f103rgtx_bootloader
ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=MDK-ARM V5.32
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-true-HAL-false,2-MX_GPIO_Init-GPIO-true-HAL-true,3-MX_DMA_Init-DMA-true-HAL-true,4-MX_SDIO_SD_Init-SDIO-true-HAL-true,5-MX_FATFS_Init-FATFS-true-HAL-false,6-MX_USART3_UART_Init-USART3-true-HAL-true,7-MX_CAN_Init-CAN-true-HAL-true,8-MX_TIM7_Init-TIM7-true-HAL-true,9-MX_RTC_Init-RTC-false-HAL-true
RCC.ADCFreqValue=32000000
RCC.AHBFreq_Value=64000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
RCC.APB1Freq_Value=32000000
RCC.APB1TimFreq_Value=64000000
RCC.APB2Freq_Value=64000000
RCC.APB2TimFreq_Value=64000000
RCC.FCLKCortexFreq_Value=64000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=64000000
RCC.I2S2Freq_Value=64000000
RCC.I2S3Freq_Value=64000000
RCC.IPParameters=ADCFreqValue,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,I2S2Freq_Value,I2S3Freq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,RCC_MCOSource,RTCFreq_Value,SDIOFreq_Value,SDIOHCLKDiv2FreqValue,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value
RCC.MCOFreq_Value=32000000
RCC.PLLCLKFreq_Value=64000000
RCC.PLLMCOFreq_Value=32000000
RCC.PLLMUL=RCC_PLL_MUL16
RCC.RCC_MCOSource=RCC_MCO1SOURCE_PLLCLK
RCC.RTCFreq_Value=40000
RCC.SDIOFreq_Value=64000000
RCC.SDIOHCLKDiv2FreqValue=32000000
RCC.SYSCLKFreq_VALUE=64000000
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.TimSysFreq_Value=64000000
RCC.USBFreq_Value=64000000
RTC.AutoPrediv=RTC_AUTO_1_SECOND
RTC.Format=RTC_FORMAT_BIN
RTC.IPParameters=Format,AutoPrediv
SDIO.ClockDiv=4
SDIO.IPParameters=ClockDiv
TIM7.IPParameters=Prescaler,Period
TIM7.Period=3000
TIM7.Prescaler=8000-1
USART3.BaudRate=9600*2
USART3.IPParameters=VirtualMode,BaudRate
USART3.VirtualMode=VM_ASYNC
VP_FATFS_VS_SDIO.Mode=SDIO
VP_FATFS_VS_SDIO.Signal=FATFS_VS_SDIO
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate
VP_RTC_VS_RTC_Calendar.Mode=RTC_Calendar
VP_RTC_VS_RTC_Calendar.Signal=RTC_VS_RTC_Calendar
VP_SYS_VS_ND.Mode=No_Debug
VP_SYS_VS_ND.Signal=SYS_VS_ND
VP_SYS_VS_tim8.Mode=TIM8
VP_SYS_VS_tim8.Signal=SYS_VS_tim8
VP_TIM7_VS_ClockSourceINT.Mode=Enable_Timer
VP_TIM7_VS_ClockSourceINT.Signal=TIM7_VS_ClockSourceINT
board=custom