diff --git a/latest/Firmware/NMEA2000Adapter/.cproject b/latest/Firmware/NMEA2000Adapter/.cproject index 34549ad..ff544d0 100644 --- a/latest/Firmware/NMEA2000Adapter/.cproject +++ b/latest/Firmware/NMEA2000Adapter/.cproject @@ -174,7 +174,7 @@ - + @@ -184,7 +184,7 @@ - + @@ -196,7 +196,7 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/latest/Firmware/NMEA2000Adapter/.gitignore b/latest/Firmware/NMEA2000Adapter/.gitignore index f46ca94..aad9175 100644 --- a/latest/Firmware/NMEA2000Adapter/.gitignore +++ b/latest/Firmware/NMEA2000Adapter/.gitignore @@ -19,3 +19,5 @@ Debug /Board1.3-L422/ /Board2.0-L422/ /Board6.0-L432/ +/Board7.0-L432/ +/Board2.0-L432/ diff --git a/latest/Firmware/NMEA2000Adapter/Core/Src/NMEA0183Consumer.cpp b/latest/Firmware/NMEA2000Adapter/Core/Src/NMEA0183Consumer.cpp index 45f9ccc..2c8da34 100644 --- a/latest/Firmware/NMEA2000Adapter/Core/Src/NMEA0183Consumer.cpp +++ b/latest/Firmware/NMEA2000Adapter/Core/Src/NMEA0183Consumer.cpp @@ -144,7 +144,7 @@ void NMEA0183Consumer::processGPSSentence(const char *str) if ( mN2K->SendMsg(pos) ) { - printf("Sent PGN129029\r\n"); + //printf("Sent PGN129029\r\n"); } } @@ -168,7 +168,7 @@ void NMEA0183Consumer::processGPSSentence(const char *str) SetN2kLatLonRapid(pos, lat, lng); if ( mN2K->SendMsg(pos) ) { - printf("Sent PGN129025\r\n"); + //printf("Sent PGN129025\r\n"); } sog = atof(sentence.fields()[7].c_str()); @@ -193,7 +193,7 @@ void NMEA0183Consumer::processGPSSentence(const char *str) KnotsToms(sog)); if ( mN2K->SendMsg(cogsog) ) { - printf("Sent PGN129026\r\n"); + //printf("Sent PGN129026\r\n"); } } } @@ -276,7 +276,7 @@ void NMEA0183Consumer::processAISSentence(const char *str) /** * TODO: This function will be off by a day on leap years. * Once GNSS data flows through this system regularly, then this can be fixed. -*/ + */ uint16_t NMEA0183Consumer::calcETADate(int month, int day) { @@ -344,7 +344,7 @@ void NMEA0183Consumer::processAISBody(tN2kAISTranceiverInfo aisInfo, const strin if ( mN2K->SendMsg(n2kmsg) ) { - printf("Sent PGN129038, aisInfo=%d:\r\n", aisInfo); + //printf("Sent PGN129038, aisInfo=%d:\r\n", aisInfo); } } break; @@ -377,11 +377,11 @@ void NMEA0183Consumer::processAISBody(tN2kAISTranceiverInfo aisInfo, const strin if ( mN2K->SendMsg(n2kmsg) ) { - printf("Sent PGN129794:\r\n"); + //printf("Sent PGN129794:\r\n"); } else { - printf("Failed to send PGN 129794\r\n"); + //printf("Failed to send PGN 129794\r\n"); } } break; @@ -413,11 +413,11 @@ void NMEA0183Consumer::processAISBody(tN2kAISTranceiverInfo aisInfo, const strin aisInfo); if ( mN2K->SendMsg(n2kmsg) ) { - printf("Sent PGN129039\r\n"); + //printf("Sent PGN129039\r\n"); } else { - printf("Failed to send PGN 129039\r\n"); + //printf("Failed to send PGN 129039\r\n"); } } break; @@ -450,11 +450,11 @@ void NMEA0183Consumer::processAISBody(tN2kAISTranceiverInfo aisInfo, const strin if ( mN2K->SendMsg(n2kmsg) ) { - printf("Sent PGN129041\r\n"); + //printf("Sent PGN129041\r\n"); } else { - printf("Failed to send PGN 129041\r\n"); + //printf("Failed to send PGN 129041\r\n"); } } break; @@ -496,14 +496,16 @@ void NMEA0183Consumer::processAISBody(tN2kAISTranceiverInfo aisInfo, const strin { if ( m->part_num == 0 ) { - printf("Sent PGN129809\r\n"); + //printf("Sent PGN129809\r\n"); } else - printf("Sent PGN129810\r\n"); + { + //printf("Sent PGN129810\r\n"); + } } else { - printf("Failed to send PGN129809/810\r\n"); + //printf("Failed to send PGN129809/810\r\n"); } } break; diff --git a/latest/Firmware/NMEA2000Adapter/Core/Src/bsp/board_6.0.cpp b/latest/Firmware/NMEA2000Adapter/Core/Src/bsp/board_7.0.cpp similarity index 81% rename from latest/Firmware/NMEA2000Adapter/Core/Src/bsp/board_6.0.cpp rename to latest/Firmware/NMEA2000Adapter/Core/Src/bsp/board_7.0.cpp index d18e010..b36c7e2 100644 --- a/latest/Firmware/NMEA2000Adapter/Core/Src/bsp/board_6.0.cpp +++ b/latest/Firmware/NMEA2000Adapter/Core/Src/bsp/board_7.0.cpp @@ -13,6 +13,9 @@ #define CS_PORT GPIOA #define CS_PIN GPIO_PIN_2 +#define NMEA_IN_PORT GPIOA +#define NMEA_IN_PIN GPIO_PIN_3 + #define SCK_PORT GPIOA #define SCK_PIN GPIO_PIN_5 @@ -22,12 +25,18 @@ #define MOSI_PORT GPIOA #define MOSI_PIN GPIO_PIN_7 -#define TX_SWITCH_PORT GPIOA -#define TX_SWITCH_PIN GPIO_PIN_8 +#define UART_TX_PORT GPIOA +#define UART_TX_PIN GPIO_PIN_9 #define UART_RX_PORT GPIOA #define UART_RX_PIN GPIO_PIN_10 +#define NMEA_EN_PORT GPIOB +#define NMEA_EN_PIN GPIO_PIN_0 + +#define GREENPAK_RESET_PORT GPIOB +#define GREENPAK_RESET_PIN GPIO_PIN_3 + #define CONFIG_ADDRESS 0x0801F800 #define CONFIG_MAGIC 0x313DEEF6 @@ -56,19 +65,23 @@ typedef struct } GPIO; static const GPIO __gpios[] = { - {TX_SWITCH_PORT, {TX_SWITCH_PIN, GPIO_MODE_INPUT, GPIO_NOPULL, GPIO_SPEED_LOW, 0}, GPIO_PIN_RESET}, {CS_PORT, {CS_PIN, GPIO_MODE_OUTPUT_PP, GPIO_NOPULL, GPIO_SPEED_HIGH, 0}, GPIO_PIN_SET}, {SCK_PORT, {SCK_PIN, GPIO_MODE_AF_PP, GPIO_NOPULL, GPIO_SPEED_HIGH, GPIO_AF5_SPI1}, GPIO_PIN_SET}, {MISO_PORT, {MISO_PIN, GPIO_MODE_AF_PP, GPIO_NOPULL, GPIO_SPEED_HIGH, GPIO_AF5_SPI1}, GPIO_PIN_SET}, {MOSI_PORT, {MOSI_PIN, GPIO_MODE_AF_PP, GPIO_NOPULL, GPIO_SPEED_HIGH, GPIO_AF5_SPI1}, GPIO_PIN_SET}, - {UART_RX_PORT, {UART_RX_PIN, GPIO_MODE_AF_PP, GPIO_NOPULL, GPIO_SPEED_LOW, GPIO_AF7_USART1}, GPIO_PIN_RESET}, + //{UART_TX_PORT, {UART_TX_PIN, GPIO_MODE_INPUT, GPIO_NOPULL, GPIO_SPEED_LOW, 0}, GPIO_PIN_RESET}, + //{UART_RX_PORT, {UART_RX_PIN, GPIO_MODE_INPUT, GPIO_NOPULL, GPIO_SPEED_LOW, 0}, GPIO_PIN_RESET}, + {NMEA_IN_PORT, {NMEA_IN_PIN, GPIO_MODE_AF_PP, GPIO_NOPULL, GPIO_SPEED_HIGH, GPIO_AF7_USART2}, GPIO_PIN_RESET}, + //{GREENPAK_RESET_PORT, {GREENPAK_RESET_PIN, GPIO_MODE_OUTPUT_OD, GPIO_SPEED_MEDIUM, 0}, GPIO_PIN_SET}, + {NMEA_EN_PORT, {NMEA_EN_PIN, GPIO_MODE_OUTPUT_PP, GPIO_NOPULL, GPIO_SPEED_LOW, 0}, GPIO_PIN_SET}, + }; SPI_HandleTypeDef hspi1; -UART_HandleTypeDef huart1; +//UART_HandleTypeDef huart1; UART_HandleTypeDef huart2; -TIM_HandleTypeDef htim6; +//TIM_HandleTypeDef htim6; IWDG_HandleTypeDef hiwdg; void gpio_pin_init(); @@ -101,11 +114,12 @@ void bsp_refresh_wdt() HAL_IWDG_Refresh(&hiwdg); } - +#if 0 void bsp_set_can_irq_cb(can_irq_callback cb) { can_irq = cb; } +#endif uint32_t bsp_dwt_init(void) { @@ -146,13 +160,14 @@ void bsp_init() //setvbuf(stderr, NULL, _IONBF, 0); HAL_Init(); + SystemClock_Config(); + __HAL_RCC_SPI1_CLK_ENABLE(); + //__HAL_RCC_USART1_CLK_ENABLE(); + __HAL_RCC_USART2_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); - __HAL_RCC_SPI1_CLK_ENABLE(); - __HAL_RCC_USART1_CLK_ENABLE(); - __HAL_RCC_USART2_CLK_ENABLE(); gpio_pin_init(); @@ -179,6 +194,9 @@ void bsp_init() } __HAL_SPI_ENABLE(&hspi1); + //HAL_NVIC_EnableIRQ(EXTI0_IRQn); + +#if 0 // UART1 huart1.Instance = USART1; @@ -199,11 +217,38 @@ void bsp_init() HAL_NVIC_EnableIRQ(USART1_IRQn); HAL_NVIC_SetPriority(USART1_IRQn, 1, 0); __HAL_UART_ENABLE_IT(&huart1, UART_IT_RXNE); +#endif + + + // UART2 + huart2.Instance = USART2; + huart2.Init.BaudRate = 38400; + huart2.Init.WordLength = UART_WORDLENGTH_8B; + huart2.Init.StopBits = UART_STOPBITS_1; + huart2.Init.Parity = UART_PARITY_NONE; + huart2.Init.Mode = UART_MODE_RX; + huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; + huart2.Init.OverSampling = UART_OVERSAMPLING_16; + huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; + huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; + if (HAL_UART_Init(&huart2) != HAL_OK) + { + Error_Handler(); + } + + HAL_NVIC_EnableIRQ(USART2_IRQn); + HAL_NVIC_SetPriority(USART2_IRQn, 1, 0); + __HAL_UART_ENABLE_IT(&huart2, UART_IT_RXNE); // We'll be using the Cortex M4 cycle counter for microsecond delays bsp_dwt_init(); +#if 0 + HAL_GPIO_WritePin(GREENPAK_RESET_PORT, GREENPAK_RESET_PIN, GPIO_PIN_RESET); + bsp_delay_us(300); + HAL_GPIO_WritePin(GREENPAK_RESET_PORT, GREENPAK_RESET_PIN, GPIO_PIN_SET); +#endif } void gpio_pin_init() @@ -304,7 +349,7 @@ void bsp_save_can_address(uint8_t address) extern "C" { - +#if 0 int _write(int fd, char* ptr, int len) { HAL_StatusTypeDef hstatus; @@ -315,6 +360,7 @@ extern "C" { else return -1; } +#endif // delay() and millis() for compatibility with Arduino @@ -328,16 +374,26 @@ extern "C" { return HAL_GetTick(); } + void USART2_IRQHandler(void) + { + if ( __HAL_UART_GET_IT(&huart2, UART_IT_RXNE) ) + { + __HAL_UART_CLEAR_IT(&huart2, UART_IT_RXNE); + char c = USART2->RDR; + if ( usart_irq ) + usart_irq(c); + } + } + +#if 0 void USART1_IRQHandler(void) { if ( __HAL_UART_GET_IT(&huart1, UART_IT_RXNE) ) { __HAL_UART_CLEAR_IT(&huart1, UART_IT_RXNE); - char c = USART1->RDR; - if ( usart_irq ) - usart_irq(c); } } +#endif void SysTick_Handler(void) { @@ -354,7 +410,6 @@ void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; /** Configure the main internal regulator output voltage */ @@ -365,30 +420,22 @@ void SystemClock_Config(void) /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSI; + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.LSIState = RCC_LSI_ON; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; RCC_OscInitStruct.PLL.PLLM = 1; RCC_OscInitStruct.PLL.PLLN = 10; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7; RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2; RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2; - -#if defined(STM32L432xx) || defined(STM32L431xx) - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7; -#endif - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { Error_Handler(); } /** Initializes the CPU, AHB and APB buses clocks */ - - - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; @@ -400,12 +447,6 @@ void SystemClock_Config(void) { Error_Handler(); } - PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART1; - PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2; - if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) - { - Error_Handler(); - } } @@ -455,9 +496,14 @@ void Error_Handler(void) { /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ + //GPIO io = {UART_TX_PORT, {UART_TX_PIN, GPIO_MODE_AF_PP, GPIO_NOPULL, GPIO_SPEED_LOW, GPIO_AF7_USART1}, GPIO_PIN_RESET}; + //HAL_GPIO_Init(io.port, (GPIO_InitTypeDef*)&io.gpio); + __disable_irq(); asm("bkpt 0"); + //printf("FATAL ERROR\n"); + while (1) { } diff --git a/latest/Firmware/NMEA2000Adapter/Core/Src/main.cpp b/latest/Firmware/NMEA2000Adapter/Core/Src/main.cpp index 2b4e2da..74108b7 100644 --- a/latest/Firmware/NMEA2000Adapter/Core/Src/main.cpp +++ b/latest/Firmware/NMEA2000Adapter/Core/Src/main.cpp @@ -12,7 +12,7 @@ int main(void) { bsp_init(); - printf("MAIANA NMEA2000 adapter started\r\n"); + //printf("MAIANA NMEA2000 adapter started\r\n"); EventPool::instance().init(); EventQueue::instance().init(); @@ -34,7 +34,7 @@ int main(void) n2k->SetProductInformation("", // Manufacturer's Model serial code 1, // Manufacturer's product code "MAIANA", // Manufacturer's Model ID - "1.1.0", // Manufacturer's Software version code + "1.1.1", // Manufacturer's Software version code "1.0", // Manufacturer's Model version 0); @@ -48,11 +48,11 @@ int main(void) if ( n2k->Open() ) { - printf("Successfully opened CAN bus\r\n"); + //printf("Successfully opened CAN bus\r\n"); } else { - printf("Failed to open CAN bus!!\r\n"); + //printf("Failed to open CAN bus!!\r\n"); } #if !DEBUG_LISTENER diff --git a/latest/Firmware/NMEA2000Adapter/STM32L432KBUX_FLASH.ld b/latest/Firmware/NMEA2000Adapter/STM32L432KBUX_FLASH.ld new file mode 100644 index 0000000..7a1a42e --- /dev/null +++ b/latest/Firmware/NMEA2000Adapter/STM32L432KBUX_FLASH.ld @@ -0,0 +1,187 @@ +/* +****************************************************************************** +** +** @file : LinkerScript.ld +** +** @author : Auto-generated by STM32CubeIDE +** +** @brief : Linker script for STM32L432KBUx Device from STM32L4 series +** 128Kbytes FLASH +** 64Kbytes RAM +** 16Kbytes RAM2 +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +****************************************************************************** +** @attention +** +** Copyright (c) 2022 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +****************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ + +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Memories definition */ +MEMORY +{ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K + RAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 16K + FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data into "FLASH" Rom type memory */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data into "FLASH" Rom type memory */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + } >FLASH + + .ARM : { + . = ALIGN(4); + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + . = ALIGN(4); + } >FLASH + + .preinit_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + . = ALIGN(4); + } >FLASH + + .init_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + . = ALIGN(4); + } >FLASH + + .fini_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(4); + } >FLASH + + /* Used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections into "RAM" Ram type memory */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + + } >RAM AT> FLASH + + /* Uninitialized data section into "RAM" Ram type memory */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the compiler libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/latest/Firmware/NMEA2000Adapter/maiana-n2k.ioc b/latest/Firmware/NMEA2000Adapter/maiana-n2k.ioc index a0d157c..05d38c0 100644 --- a/latest/Firmware/NMEA2000Adapter/maiana-n2k.ioc +++ b/latest/Firmware/NMEA2000Adapter/maiana-n2k.ioc @@ -1,162 +1,162 @@ #MicroXplorer Configuration settings - do not modify -Mcu.Family=STM32L4 -RCC.MSI_VALUE=4000000 -ProjectManager.MainLocation=Core/Src -PA6.Mode=Full_Duplex_Master -RCC.PLLQoutputFreq_Value=80000000 -RCC.USART1Freq_Value=80000000 -ProjectManager.ProjectFileName=L422-ForCAN.ioc -RCC.CortexFreq_Value=80000000 -PA7.Mode=Full_Duplex_Master -NVIC.I2C1_EV_IRQn=true\:0\:0\:false\:false\:true\:true\:true -PA13\ (JTMS/SWDIO).Mode=Serial_Wire -ProjectManager.KeepUserCode=true -Mcu.UserName=STM32L422KBUx -PA10.Mode=Asynchronous -Mcu.PinsNb=13 -SPI1.VirtualType=VM_MASTER -ProjectManager.NoMain=false -SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,BaudRatePrescaler -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_I2C1_Init-I2C1-false-HAL-true,4-MX_SPI1_Init-SPI1-false-HAL-true,5-MX_USART1_UART_Init-USART1-false-HAL-true -SH.GPXTI0.ConfNb=1 -ProjectManager.DefaultFWLocation=true -RCC.USART2Freq_Value=80000000 -ProjectManager.DeletePrevious=true -USART1.IPParameters=VirtualMode-Asynchronous -PA2.GPIOParameters=PinState,GPIO_Label,GPIO_ModeDefaultOutputPP -PinOutPanel.RotationAngle=0 -RCC.FamilyName=M -RCC.MCO1PinFreq_Value=80000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -ProjectManager.StackSize=0x400 -RCC.I2C3Freq_Value=80000000 -RCC.LPTIM1Freq_Value=80000000 -USART1.VirtualMode-Asynchronous=VM_ASYNC -Mcu.IP4=SYS -RCC.FCLKCortexFreq_Value=80000000 -Mcu.IP5=USART1 +File.Version=6 +GPIO.groupedBy= I2C1.IPParameters=OwnAddress,Timing -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false +I2C1.OwnAddress=0x38 +I2C1.Timing=0x10909CEC +KeepUserPlacement=false +Mcu.Family=STM32L4 +Mcu.IP0=I2C1 +Mcu.IP1=NVIC Mcu.IP2=RCC Mcu.IP3=SPI1 -Mcu.IP0=I2C1 -PA9.Mode=Asynchronous -PA14\ (JTCK/SWCLK).Signal=SYS_JTCK-SWCLK -Mcu.IP1=NVIC -PA4.PinState=GPIO_PIN_SET -Mcu.UserConstants= -ProjectManager.TargetToolchain=SW4STM32 -Mcu.ThirdPartyNb=0 -SPI1.Direction=SPI_DIRECTION_2LINES -RCC.HCLKFreq_Value=80000000 +Mcu.IP4=SYS +Mcu.IP5=USART1 Mcu.IPNb=6 -ProjectManager.PreviousToolchain=SW4STM32 -RCC.APB2TimFreq_Value=80000000 -PA9.Signal=USART1_TX -PB6.Signal=I2C1_SCL -I2C1.Timing=0x10909CEC -PB6.Mode=I2C -SPI1.CalculateBaudRate=10.0 MBits/s -Mcu.Pin6=PA9 -Mcu.Pin7=PA10 -ProjectManager.RegisterCallBack= -Mcu.Pin8=PA13 (JTMS/SWDIO) -RCC.USBFreq_Value=4000000 -Mcu.Pin9=PA14 (JTCK/SWCLK) -RCC.LSE_VALUE=32768 -RCC.AHBFreq_Value=80000000 +Mcu.Name=STM32L422KBUx +Mcu.Package=UFQFPN32 Mcu.Pin0=PA2 Mcu.Pin1=PA4 -GPIO.groupedBy= +Mcu.Pin10=PB6 +Mcu.Pin11=PB7 +Mcu.Pin12=VP_SYS_VS_Systick Mcu.Pin2=PA5 Mcu.Pin3=PA6 Mcu.Pin4=PA7 Mcu.Pin5=PB0 -PA5.Signal=SPI1_SCK -ProjectManager.ProjectBuild=false -RCC.HSE_VALUE=8000000 -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -board=custom -PA4.Locked=true -RCC.VCOOutputFreq_Value=160000000 -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -ProjectManager.LastFirmware=true -ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.16.0 -MxDb.Version=DB.6.0.10 -PA2.PinState=GPIO_PIN_SET -RCC.APB2Freq_Value=80000000 -ProjectManager.BackupPrevious=false +Mcu.Pin6=PA9 +Mcu.Pin7=PA10 +Mcu.Pin8=PA13 (JTMS/SWDIO) +Mcu.Pin9=PA14 (JTCK/SWCLK) +Mcu.PinsNb=13 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32L422KBUx MxCube.Version=6.1.2 -RCC.VCOInputFreq_Value=4000000 -RCC.I2C1Freq_Value=80000000 -SPI1.Mode=SPI_MODE_MASTER -RCC.RNGFreq_Value=4000000 -RCC.ADCFreq_Value=80000000 -SPI1.DataSize=SPI_DATASIZE_8BIT -File.Version=6 -VP_SYS_VS_Systick.Mode=SysTick -PB7.Signal=I2C1_SDA -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA14\ (JTCK/SWCLK).Mode=Serial_Wire -RCC.PLLRCLKFreq_Value=80000000 -PA4.GPIOParameters=PinState,GPIO_Label,GPIO_ModeDefaultOutputPP -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -ProjectManager.FreePins=false -RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CRSFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C3Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PWRFreq_Value,RNGFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USART1Freq_Value,USART2Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value -ProjectManager.AskForMigrate=true -Mcu.Name=STM32L422KBUx -RCC.LPTIM2Freq_Value=80000000 -ProjectManager.HalAssertFull=false -PB0.Locked=true -PA2.Signal=GPIO_Output -RCC.CRSFreq_Value=48000000 -ProjectManager.ProjectName=L422-ForCAN -ProjectManager.UnderRoot=true -I2C1.OwnAddress=0x38 -ProjectManager.CoupleFile=false -NVIC.EXTI0_IRQn=true\:0\:0\:false\:false\:true\:true\:true -PA4.Signal=GPIO_Output -RCC.SYSCLKFreq_VALUE=80000000 -Mcu.Package=UFQFPN32 -PA6.Signal=SPI1_MISO -PA5.Locked=true -PA2.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP -NVIC.ForceEnableDMAVector=true -KeepUserPlacement=false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -ProjectManager.CompilerOptimize=6 -ProjectManager.ToolChainLocation= -PA2.GPIO_Label=SPI1_CS -RCC.LSI_VALUE=32000 -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -PB7.Mode=I2C -SH.GPXTI0.0=GPIO_EXTI0 -RCC.LSCOPinFreq_Value=32000 -PA10.Signal=USART1_RX -ProjectManager.HeapSize=0x200 -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA4.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD -ProjectManager.ComputerToolchain=false -RCC.HSI_VALUE=16000000 -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -Mcu.Pin11=PB7 -Mcu.Pin12=VP_SYS_VS_Systick -RCC.PLLN=40 -Mcu.Pin10=PB6 -RCC.APB1TimFreq_Value=80000000 +MxDb.Version=DB.6.0.10 NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -RCC.PWRFreq_Value=80000000 -RCC.LPUART1Freq_Value=80000000 -RCC.APB1Freq_Value=80000000 -SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_8 -PB0.Signal=GPXTI0 -PA4.GPIO_Label=CAN_RST -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DeviceId=STM32L422KBUx -ProjectManager.LibraryCopy=1 -RCC.HSI48_VALUE=48000000 +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false +NVIC.EXTI0_IRQn=true\:0\:0\:false\:false\:true\:true\:true +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false +NVIC.I2C1_EV_IRQn=true\:0\:0\:false\:false\:true\:true\:true +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false +NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false +PA10.Mode=Asynchronous +PA10.Signal=USART1_RX +PA13\ (JTMS/SWDIO).Mode=Serial_Wire PA13\ (JTMS/SWDIO).Signal=SYS_JTMS-SWDIO -PA5.Mode=Full_Duplex_Master -PA7.Signal=SPI1_MOSI +PA14\ (JTCK/SWCLK).Mode=Serial_Wire +PA14\ (JTCK/SWCLK).Signal=SYS_JTCK-SWCLK +PA2.GPIOParameters=PinState,GPIO_Label,GPIO_ModeDefaultOutputPP +PA2.GPIO_Label=SPI1_CS +PA2.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP PA2.Locked=true +PA2.PinState=GPIO_PIN_SET +PA2.Signal=GPIO_Output +PA4.GPIOParameters=PinState,GPIO_Label,GPIO_ModeDefaultOutputPP +PA4.GPIO_Label=CAN_RST +PA4.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD +PA4.Locked=true +PA4.PinState=GPIO_PIN_SET +PA4.Signal=GPIO_Output +PA5.Locked=true +PA5.Mode=Full_Duplex_Master +PA5.Signal=SPI1_SCK +PA6.Mode=Full_Duplex_Master +PA6.Signal=SPI1_MISO +PA7.Mode=Full_Duplex_Master +PA7.Signal=SPI1_MOSI +PA9.Mode=Asynchronous +PA9.Signal=USART1_TX +PB0.Locked=true +PB0.Signal=GPXTI0 +PB6.Mode=I2C +PB6.Signal=I2C1_SCL +PB7.Mode=I2C +PB7.Signal=I2C1_SDA +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=false +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32L422KBUx +ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.16.0 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=1 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain=SW4STM32 +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=maiana-n2k.ioc +ProjectManager.ProjectName=maiana-n2k +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=SW4STM32 +ProjectManager.ToolChainLocation= +ProjectManager.UnderRoot=true +ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_I2C1_Init-I2C1-false-HAL-true,4-MX_SPI1_Init-SPI1-false-HAL-true,5-MX_USART1_UART_Init-USART1-false-HAL-true +RCC.ADCFreq_Value=80000000 +RCC.AHBFreq_Value=80000000 +RCC.APB1Freq_Value=80000000 +RCC.APB1TimFreq_Value=80000000 +RCC.APB2Freq_Value=80000000 +RCC.APB2TimFreq_Value=80000000 +RCC.CRSFreq_Value=48000000 +RCC.CortexFreq_Value=80000000 +RCC.FCLKCortexFreq_Value=80000000 +RCC.FamilyName=M +RCC.HCLKFreq_Value=80000000 +RCC.HSE_VALUE=8000000 +RCC.HSI48_VALUE=48000000 +RCC.HSI_VALUE=16000000 +RCC.I2C1Freq_Value=80000000 +RCC.I2C3Freq_Value=80000000 +RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CRSFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C3Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PWRFreq_Value,RNGFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USART1Freq_Value,USART2Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value +RCC.LPTIM1Freq_Value=80000000 +RCC.LPTIM2Freq_Value=80000000 +RCC.LPUART1Freq_Value=80000000 +RCC.LSCOPinFreq_Value=32000 +RCC.LSE_VALUE=32768 +RCC.LSI_VALUE=32000 +RCC.MCO1PinFreq_Value=80000000 +RCC.MSI_VALUE=4000000 +RCC.PLLN=40 +RCC.PLLQoutputFreq_Value=80000000 +RCC.PLLRCLKFreq_Value=80000000 +RCC.PWRFreq_Value=80000000 +RCC.RNGFreq_Value=4000000 +RCC.SYSCLKFreq_VALUE=80000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.USART1Freq_Value=80000000 +RCC.USART2Freq_Value=80000000 +RCC.USBFreq_Value=4000000 +RCC.VCOInputFreq_Value=4000000 +RCC.VCOOutputFreq_Value=160000000 +SH.GPXTI0.0=GPIO_EXTI0 +SH.GPXTI0.ConfNb=1 +SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_8 +SPI1.CalculateBaudRate=10.0 MBits/s +SPI1.DataSize=SPI_DATASIZE_8BIT +SPI1.Direction=SPI_DIRECTION_2LINES +SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,BaudRatePrescaler +SPI1.Mode=SPI_MODE_MASTER +SPI1.VirtualType=VM_MASTER +USART1.IPParameters=VirtualMode-Asynchronous +USART1.VirtualMode-Asynchronous=VM_ASYNC +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +board=custom