├── .gitignore ├── _config.yml ├── assets └── css │ └── style.scss ├── docs ├── SLMX4_Data_Sheet_2022.pdf ├── XTAN-13_XeThruX4RadarUserGuide_rev_a.pdf ├── epam_fov │ ├── azi │ │ ├── epam_azi_7.1GHz.png │ │ ├── epam_azi_7.2GHz.png │ │ ├── epam_azi_7.3GHz.png │ │ ├── epam_azi_7.4GHz.png │ │ └── epam_azi_7.5GHz.png │ └── elev │ │ ├── epam_elev_7.1GHz.png │ │ ├── epam_elev_7.2GHz.png │ │ ├── epam_elev_7.3GHz.png │ │ ├── epam_elev_7.4GHz.png │ │ └── epam_elev_7.5GHz.png └── mech │ └── SLMX4-Base 2P1 PCB Mechanical.PDF ├── firmware ├── health_app.md ├── insecure_fw_update.md └── readme.md ├── images ├── MCUXpresso_firmware_update │ ├── 1.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 13.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.PNG │ ├── 6.PNG │ ├── 7.PNG │ ├── 8.png │ └── 9.png ├── firmware_update │ ├── boot_util_1.png │ ├── boot_util_2.png │ ├── boot_util_3.png │ ├── boot_util_4.png │ ├── boot_util_5.png │ ├── slmx4_base_fw_update_boot_pins.jpg │ └── slmx4_base_normal_boot_pins.jpg ├── health_app │ ├── fast_movement_reset.png │ ├── presence.png │ └── respiration.png ├── initial_unboxing_and_setup │ ├── 1.png │ ├── 10.png │ ├── 11.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ └── 9.png ├── matlab │ ├── basic_capture.png │ ├── timer_test.png │ └── virtual_com.png ├── sli_logo.png ├── slmx4-base_epam0p2_system_architecture.png ├── slmx4_epam0p1.PNG ├── slmx4_white_render.png └── usb │ ├── usb_driver1.png │ ├── usb_driver2.png │ ├── usb_driver3.png │ ├── usb_driver4.png │ ├── usb_driver5.png │ ├── usb_driver6.png │ ├── usb_driver7.png │ └── usb_driver8.png ├── license.md ├── matlab ├── readme.md ├── timer_test.m ├── unit_test.m ├── vcom_test.m └── vcom_xep_radar_connector.m ├── protocol_buffers ├── README.md ├── slmx4_health.md ├── slmx4_usb_vcom.options └── slmx4_usb_vcom.proto ├── python ├── .gitignore ├── README.md ├── slmx4_health_debug.py ├── slmx4_health_polling_demo.py ├── slmx4_health_streaming_demo.py ├── slmx4_health_streaming_plot_demo.py ├── slmx4_health_wrapper.py └── slmx4_usb_vcom_pb2.py ├── readme.md ├── slmx4_projects ├── button_demo │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── CMSIS │ │ ├── arm_common_tables.h │ │ ├── arm_const_structs.h │ │ ├── arm_math.h │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm7.h │ │ ├── mpu_armv7.h │ │ └── mpu_armv8.h │ ├── amazon-freertos │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── freertos │ │ │ ├── event_groups.c │ │ │ ├── list.c │ │ │ ├── portable │ │ │ │ ├── ReadMe.url │ │ │ │ ├── heap_1.c │ │ │ │ ├── heap_2.c │ │ │ │ ├── heap_3.c │ │ │ │ ├── heap_4.c │ │ │ │ ├── heap_5.c │ │ │ │ ├── port.c │ │ │ │ └── portmacro.h │ │ │ ├── queue.c │ │ │ ├── stream_buffer.c │ │ │ ├── tasks.c │ │ │ └── timers.c │ │ ├── include │ │ │ ├── FreeRTOS.h │ │ │ ├── deprecated_definitions.h │ │ │ ├── event_groups.h │ │ │ ├── freertos_tasks_c_additions.h │ │ │ ├── list.h │ │ │ ├── message_buffer.h │ │ │ ├── mpu_prototypes.h │ │ │ ├── mpu_wrappers.h │ │ │ ├── portable.h │ │ │ ├── projdefs.h │ │ │ ├── queue.h │ │ │ ├── semphr.h │ │ │ ├── stack_macros.h │ │ │ ├── stream_buffer.h │ │ │ ├── task.h │ │ │ ├── threading_alt.h │ │ │ └── timers.h │ │ └── license │ │ │ └── LICENSE │ ├── board │ │ ├── board.c │ │ ├── board.h │ │ ├── clock_config.c │ │ ├── clock_config.h │ │ ├── peripherals.c │ │ ├── peripherals.h │ │ ├── pin_mux.c │ │ └── pin_mux.h │ ├── component │ │ ├── lists │ │ │ ├── generic_list.c │ │ │ └── generic_list.h │ │ ├── serial_manager │ │ │ ├── serial_manager.c │ │ │ ├── serial_manager.h │ │ │ ├── serial_port_internal.h │ │ │ ├── serial_port_uart.c │ │ │ └── serial_port_uart.h │ │ └── uart │ │ │ ├── lpuart_adapter.c │ │ │ └── uart.h │ ├── device │ │ ├── MIMXRT1062.h │ │ ├── MIMXRT1062_features.h │ │ ├── fsl_device_registers.h │ │ ├── system_MIMXRT1062.c │ │ └── system_MIMXRT1062.h │ ├── doc │ │ └── amazon-freertos │ │ │ ├── ChangeLogKSDK.txt │ │ │ ├── directories.txt │ │ │ ├── freertos │ │ │ └── portable │ │ │ │ └── readme.txt │ │ │ └── license │ │ │ └── directories.txt │ ├── drivers │ │ ├── freertos │ │ │ ├── fsl_lpi2c_freertos.c │ │ │ ├── fsl_lpi2c_freertos.h │ │ │ ├── fsl_lpspi_freertos.c │ │ │ └── fsl_lpspi_freertos.h │ │ ├── fsl_clock.c │ │ ├── fsl_clock.h │ │ ├── fsl_common.c │ │ ├── fsl_common.h │ │ ├── fsl_flexspi.c │ │ ├── fsl_flexspi.h │ │ ├── fsl_gpio.c │ │ ├── fsl_gpio.h │ │ ├── fsl_iomuxc.h │ │ ├── fsl_lpi2c.c │ │ ├── fsl_lpi2c.h │ │ ├── fsl_lpspi.c │ │ ├── fsl_lpspi.h │ │ ├── fsl_lpuart.c │ │ ├── fsl_lpuart.h │ │ ├── fsl_pwm.c │ │ ├── fsl_pwm.h │ │ ├── fsl_xbara.c │ │ └── fsl_xbara.h │ ├── libs │ │ └── libarm_cortexM7lfsp_math.a │ ├── platform_slmx4 │ │ ├── ltr308_driver.c │ │ ├── ltr308_driver.h │ │ ├── slmx4_freertos.c │ │ └── slmx4_freertos.h │ ├── readme.md │ ├── source │ │ ├── FreeRTOSConfig.h │ │ ├── button_demo.c │ │ └── semihost_hardfault.c │ ├── startup │ │ └── startup_mimxrt1062.c │ ├── utilities │ │ ├── fsl_debug_console.c │ │ ├── fsl_debug_console.h │ │ ├── fsl_debug_console_conf.h │ │ ├── fsl_str.c │ │ └── fsl_str.h │ ├── xethru_xep │ │ ├── 8051_firmware.h │ │ ├── x4driver.c │ │ ├── x4driver.h │ │ ├── x4driver.md │ │ └── xtcompiler.h │ └── xip │ │ ├── fsl_flexspi_nor_boot.c │ │ ├── fsl_flexspi_nor_boot.h │ │ ├── slmx4_flexspi_nor_config.c │ │ ├── slmx4_flexspi_nor_config.h │ │ ├── slmx4_sdram_ini_dcd.c │ │ └── slmx4_sdram_ini_dcd.h ├── button_demo2 │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── CMSIS │ │ ├── arm_common_tables.h │ │ ├── arm_const_structs.h │ │ ├── arm_math.h │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm7.h │ │ ├── mpu_armv7.h │ │ └── mpu_armv8.h │ ├── amazon-freertos │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── freertos │ │ │ ├── event_groups.c │ │ │ ├── list.c │ │ │ ├── portable │ │ │ │ ├── ReadMe.url │ │ │ │ ├── heap_1.c │ │ │ │ ├── heap_2.c │ │ │ │ ├── heap_3.c │ │ │ │ ├── heap_4.c │ │ │ │ ├── heap_5.c │ │ │ │ ├── port.c │ │ │ │ └── portmacro.h │ │ │ ├── queue.c │ │ │ ├── stream_buffer.c │ │ │ ├── tasks.c │ │ │ └── timers.c │ │ ├── include │ │ │ ├── FreeRTOS.h │ │ │ ├── deprecated_definitions.h │ │ │ ├── event_groups.h │ │ │ ├── freertos_tasks_c_additions.h │ │ │ ├── list.h │ │ │ ├── message_buffer.h │ │ │ ├── mpu_prototypes.h │ │ │ ├── mpu_wrappers.h │ │ │ ├── portable.h │ │ │ ├── projdefs.h │ │ │ ├── queue.h │ │ │ ├── semphr.h │ │ │ ├── stack_macros.h │ │ │ ├── stream_buffer.h │ │ │ ├── task.h │ │ │ ├── threading_alt.h │ │ │ └── timers.h │ │ └── license │ │ │ └── LICENSE │ ├── board │ │ ├── board.c │ │ ├── board.h │ │ ├── clock_config.c │ │ ├── clock_config.h │ │ ├── peripherals.c │ │ ├── peripherals.h │ │ ├── pin_mux.c │ │ └── pin_mux.h │ ├── component │ │ ├── lists │ │ │ ├── generic_list.c │ │ │ └── generic_list.h │ │ ├── serial_manager │ │ │ ├── serial_manager.c │ │ │ ├── serial_manager.h │ │ │ ├── serial_port_internal.h │ │ │ ├── serial_port_uart.c │ │ │ └── serial_port_uart.h │ │ └── uart │ │ │ ├── lpuart_adapter.c │ │ │ └── uart.h │ ├── device │ │ ├── MIMXRT1062.h │ │ ├── MIMXRT1062_features.h │ │ ├── fsl_device_registers.h │ │ ├── system_MIMXRT1062.c │ │ └── system_MIMXRT1062.h │ ├── doc │ │ └── amazon-freertos │ │ │ ├── ChangeLogKSDK.txt │ │ │ ├── directories.txt │ │ │ ├── freertos │ │ │ └── portable │ │ │ │ └── readme.txt │ │ │ └── license │ │ │ └── directories.txt │ ├── drivers │ │ ├── freertos │ │ │ ├── fsl_lpi2c_freertos.c │ │ │ ├── fsl_lpi2c_freertos.h │ │ │ ├── fsl_lpspi_freertos.c │ │ │ └── fsl_lpspi_freertos.h │ │ ├── fsl_clock.c │ │ ├── fsl_clock.h │ │ ├── fsl_common.c │ │ ├── fsl_common.h │ │ ├── fsl_flexspi.c │ │ ├── fsl_flexspi.h │ │ ├── fsl_gpio.c │ │ ├── fsl_gpio.h │ │ ├── fsl_iomuxc.h │ │ ├── fsl_lpi2c.c │ │ ├── fsl_lpi2c.h │ │ ├── fsl_lpspi.c │ │ ├── fsl_lpspi.h │ │ ├── fsl_lpuart.c │ │ ├── fsl_lpuart.h │ │ ├── fsl_pwm.c │ │ ├── fsl_pwm.h │ │ ├── fsl_xbara.c │ │ └── fsl_xbara.h │ ├── libs │ │ └── libarm_cortexM7lfsp_math.a │ ├── platform_slmx4 │ │ ├── ltr308_driver.c │ │ ├── ltr308_driver.h │ │ ├── slmx4_freertos.c │ │ └── slmx4_freertos.h │ ├── readme.md │ ├── source │ │ ├── FreeRTOSConfig.h │ │ ├── demo.c │ │ └── semihost_hardfault.c │ ├── startup │ │ └── startup_mimxrt1062.c │ ├── utilities │ │ ├── fsl_debug_console.c │ │ ├── fsl_debug_console.h │ │ ├── fsl_debug_console_conf.h │ │ ├── fsl_str.c │ │ └── fsl_str.h │ ├── xethru_xep │ │ ├── 8051_firmware.h │ │ ├── x4driver.c │ │ ├── x4driver.h │ │ ├── x4driver.md │ │ └── xtcompiler.h │ └── xip │ │ ├── fsl_flexspi_nor_boot.c │ │ ├── fsl_flexspi_nor_boot.h │ │ ├── slmx4_flexspi_nor_config.c │ │ ├── slmx4_flexspi_nor_config.h │ │ ├── slmx4_sdram_ini_dcd.c │ │ └── slmx4_sdram_ini_dcd.h ├── led_blink │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── CMSIS │ │ ├── arm_common_tables.h │ │ ├── arm_const_structs.h │ │ ├── arm_math.h │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm7.h │ │ ├── mpu_armv7.h │ │ └── mpu_armv8.h │ ├── amazon-freertos │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── freertos │ │ │ ├── event_groups.c │ │ │ ├── list.c │ │ │ ├── portable │ │ │ │ ├── ReadMe.url │ │ │ │ ├── heap_1.c │ │ │ │ ├── heap_2.c │ │ │ │ ├── heap_3.c │ │ │ │ ├── heap_4.c │ │ │ │ ├── heap_5.c │ │ │ │ ├── port.c │ │ │ │ └── portmacro.h │ │ │ ├── queue.c │ │ │ ├── stream_buffer.c │ │ │ ├── tasks.c │ │ │ └── timers.c │ │ ├── include │ │ │ ├── FreeRTOS.h │ │ │ ├── deprecated_definitions.h │ │ │ ├── event_groups.h │ │ │ ├── freertos_tasks_c_additions.h │ │ │ ├── list.h │ │ │ ├── message_buffer.h │ │ │ ├── mpu_prototypes.h │ │ │ ├── mpu_wrappers.h │ │ │ ├── portable.h │ │ │ ├── projdefs.h │ │ │ ├── queue.h │ │ │ ├── semphr.h │ │ │ ├── stack_macros.h │ │ │ ├── stream_buffer.h │ │ │ ├── task.h │ │ │ ├── threading_alt.h │ │ │ └── timers.h │ │ └── license │ │ │ └── LICENSE │ ├── board │ │ ├── board.c │ │ ├── board.h │ │ ├── clock_config.c │ │ ├── clock_config.h │ │ ├── peripherals.c │ │ ├── peripherals.h │ │ ├── pin_mux.c │ │ └── pin_mux.h │ ├── component │ │ ├── lists │ │ │ ├── generic_list.c │ │ │ └── generic_list.h │ │ ├── serial_manager │ │ │ ├── serial_manager.c │ │ │ ├── serial_manager.h │ │ │ ├── serial_port_internal.h │ │ │ ├── serial_port_uart.c │ │ │ └── serial_port_uart.h │ │ └── uart │ │ │ ├── lpuart_adapter.c │ │ │ └── uart.h │ ├── device │ │ ├── MIMXRT1062.h │ │ ├── MIMXRT1062_features.h │ │ ├── fsl_device_registers.h │ │ ├── system_MIMXRT1062.c │ │ └── system_MIMXRT1062.h │ ├── doc │ │ └── amazon-freertos │ │ │ ├── ChangeLogKSDK.txt │ │ │ ├── directories.txt │ │ │ ├── freertos │ │ │ └── portable │ │ │ │ └── readme.txt │ │ │ └── license │ │ │ └── directories.txt │ ├── drivers │ │ ├── freertos │ │ │ ├── fsl_lpi2c_freertos.c │ │ │ ├── fsl_lpi2c_freertos.h │ │ │ ├── fsl_lpspi_freertos.c │ │ │ └── fsl_lpspi_freertos.h │ │ ├── fsl_clock.c │ │ ├── fsl_clock.h │ │ ├── fsl_common.c │ │ ├── fsl_common.h │ │ ├── fsl_flexspi.c │ │ ├── fsl_flexspi.h │ │ ├── fsl_gpio.c │ │ ├── fsl_gpio.h │ │ ├── fsl_iomuxc.h │ │ ├── fsl_lpi2c.c │ │ ├── fsl_lpi2c.h │ │ ├── fsl_lpspi.c │ │ ├── fsl_lpspi.h │ │ ├── fsl_lpuart.c │ │ ├── fsl_lpuart.h │ │ ├── fsl_pwm.c │ │ ├── fsl_pwm.h │ │ ├── fsl_xbara.c │ │ └── fsl_xbara.h │ ├── libs │ │ └── libarm_cortexM7lfsp_math.a │ ├── platform_slmx4 │ │ ├── ltr308_driver.c │ │ ├── ltr308_driver.h │ │ ├── slmx4_freertos.c │ │ └── slmx4_freertos.h │ ├── readme.md │ ├── source │ │ ├── FreeRTOSConfig.h │ │ ├── led_blink.c │ │ └── semihost_hardfault.c │ ├── startup │ │ └── startup_mimxrt1062.c │ ├── utilities │ │ ├── fsl_debug_console.c │ │ ├── fsl_debug_console.h │ │ ├── fsl_debug_console_conf.h │ │ ├── fsl_str.c │ │ └── fsl_str.h │ ├── xethru_xep │ │ ├── 8051_firmware.h │ │ ├── x4driver.c │ │ ├── x4driver.h │ │ ├── x4driver.md │ │ └── xtcompiler.h │ └── xip │ │ ├── fsl_flexspi_nor_boot.c │ │ ├── fsl_flexspi_nor_boot.h │ │ ├── slmx4_flexspi_nor_config.c │ │ ├── slmx4_flexspi_nor_config.h │ │ ├── slmx4_sdram_ini_dcd.c │ │ └── slmx4_sdram_ini_dcd.h ├── lux_demo │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── CMSIS │ │ ├── arm_common_tables.h │ │ ├── arm_const_structs.h │ │ ├── arm_math.h │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm7.h │ │ ├── mpu_armv7.h │ │ └── mpu_armv8.h │ ├── amazon-freertos │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── freertos │ │ │ ├── event_groups.c │ │ │ ├── list.c │ │ │ ├── portable │ │ │ │ ├── ReadMe.url │ │ │ │ ├── heap_1.c │ │ │ │ ├── heap_2.c │ │ │ │ ├── heap_3.c │ │ │ │ ├── heap_4.c │ │ │ │ ├── heap_5.c │ │ │ │ ├── port.c │ │ │ │ └── portmacro.h │ │ │ ├── queue.c │ │ │ ├── stream_buffer.c │ │ │ ├── tasks.c │ │ │ └── timers.c │ │ ├── include │ │ │ ├── FreeRTOS.h │ │ │ ├── deprecated_definitions.h │ │ │ ├── event_groups.h │ │ │ ├── freertos_tasks_c_additions.h │ │ │ ├── list.h │ │ │ ├── message_buffer.h │ │ │ ├── mpu_prototypes.h │ │ │ ├── mpu_wrappers.h │ │ │ ├── portable.h │ │ │ ├── projdefs.h │ │ │ ├── queue.h │ │ │ ├── semphr.h │ │ │ ├── stack_macros.h │ │ │ ├── stream_buffer.h │ │ │ ├── task.h │ │ │ ├── threading_alt.h │ │ │ └── timers.h │ │ └── license │ │ │ └── LICENSE │ ├── board │ │ ├── board.c │ │ ├── board.h │ │ ├── clock_config.c │ │ ├── clock_config.h │ │ ├── peripherals.c │ │ ├── peripherals.h │ │ ├── pin_mux.c │ │ └── pin_mux.h │ ├── component │ │ ├── lists │ │ │ ├── generic_list.c │ │ │ └── generic_list.h │ │ ├── serial_manager │ │ │ ├── serial_manager.c │ │ │ ├── serial_manager.h │ │ │ ├── serial_port_internal.h │ │ │ ├── serial_port_uart.c │ │ │ └── serial_port_uart.h │ │ └── uart │ │ │ ├── lpuart_adapter.c │ │ │ └── uart.h │ ├── device │ │ ├── MIMXRT1062.h │ │ ├── MIMXRT1062_features.h │ │ ├── fsl_device_registers.h │ │ ├── system_MIMXRT1062.c │ │ └── system_MIMXRT1062.h │ ├── doc │ │ └── amazon-freertos │ │ │ ├── ChangeLogKSDK.txt │ │ │ ├── directories.txt │ │ │ ├── freertos │ │ │ └── portable │ │ │ │ └── readme.txt │ │ │ └── license │ │ │ └── directories.txt │ ├── drivers │ │ ├── freertos │ │ │ ├── fsl_lpi2c_freertos.c │ │ │ ├── fsl_lpi2c_freertos.h │ │ │ ├── fsl_lpspi_freertos.c │ │ │ └── fsl_lpspi_freertos.h │ │ ├── fsl_clock.c │ │ ├── fsl_clock.h │ │ ├── fsl_common.c │ │ ├── fsl_common.h │ │ ├── fsl_flexspi.c │ │ ├── fsl_flexspi.h │ │ ├── fsl_gpio.c │ │ ├── fsl_gpio.h │ │ ├── fsl_iomuxc.h │ │ ├── fsl_lpi2c.c │ │ ├── fsl_lpi2c.h │ │ ├── fsl_lpspi.c │ │ ├── fsl_lpspi.h │ │ ├── fsl_lpuart.c │ │ ├── fsl_lpuart.h │ │ ├── fsl_pwm.c │ │ ├── fsl_pwm.h │ │ ├── fsl_xbara.c │ │ └── fsl_xbara.h │ ├── libs │ │ └── libarm_cortexM7lfsp_math.a │ ├── platform_slmx4 │ │ ├── ltr308_driver.c │ │ ├── ltr308_driver.h │ │ ├── slmx4_freertos.c │ │ └── slmx4_freertos.h │ ├── readme.md │ ├── source │ │ ├── FreeRTOSConfig.h │ │ ├── demo.c │ │ └── semihost_hardfault.c │ ├── startup │ │ └── startup_mimxrt1062.c │ ├── utilities │ │ ├── fsl_debug_console.c │ │ ├── fsl_debug_console.h │ │ ├── fsl_debug_console_conf.h │ │ ├── fsl_str.c │ │ └── fsl_str.h │ ├── xethru_xep │ │ ├── 8051_firmware.h │ │ ├── x4driver.c │ │ ├── x4driver.h │ │ ├── x4driver.md │ │ └── xtcompiler.h │ └── xip │ │ ├── fsl_flexspi_nor_boot.c │ │ ├── fsl_flexspi_nor_boot.h │ │ ├── slmx4_flexspi_nor_config.c │ │ ├── slmx4_flexspi_nor_config.h │ │ ├── slmx4_sdram_ini_dcd.c │ │ └── slmx4_sdram_ini_dcd.h ├── readme.md └── vcom_xep_matlab_server │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── .settings │ └── language.settings.xml │ ├── CMSIS │ ├── arm_common_tables.h │ ├── arm_const_structs.h │ ├── arm_math.h │ ├── cmsis_armcc.h │ ├── cmsis_armclang.h │ ├── cmsis_compiler.h │ ├── cmsis_gcc.h │ ├── cmsis_iccarm.h │ ├── cmsis_version.h │ ├── core_armv8mbl.h │ ├── core_armv8mml.h │ ├── core_cm7.h │ ├── mpu_armv7.h │ └── mpu_armv8.h │ ├── amazon-freertos │ ├── CHANGELOG.md │ ├── README.md │ ├── freertos │ │ ├── event_groups.c │ │ ├── list.c │ │ ├── portable │ │ │ ├── ReadMe.url │ │ │ ├── heap_1.c │ │ │ ├── heap_2.c │ │ │ ├── heap_3.c │ │ │ ├── heap_4.c │ │ │ ├── heap_5.c │ │ │ ├── port.c │ │ │ └── portmacro.h │ │ ├── queue.c │ │ ├── stream_buffer.c │ │ ├── tasks.c │ │ └── timers.c │ ├── include │ │ ├── FreeRTOS.h │ │ ├── deprecated_definitions.h │ │ ├── event_groups.h │ │ ├── freertos_tasks_c_additions.h │ │ ├── list.h │ │ ├── message_buffer.h │ │ ├── mpu_prototypes.h │ │ ├── mpu_wrappers.h │ │ ├── portable.h │ │ ├── projdefs.h │ │ ├── queue.h │ │ ├── semphr.h │ │ ├── stack_macros.h │ │ ├── stream_buffer.h │ │ ├── task.h │ │ ├── threading_alt.h │ │ └── timers.h │ └── license │ │ └── LICENSE │ ├── board │ ├── board.c │ ├── board.h │ ├── clock_config.c │ ├── clock_config.h │ ├── peripherals.c │ ├── peripherals.h │ ├── pin_mux.c │ └── pin_mux.h │ ├── component │ ├── i2c │ │ ├── i2c.h │ │ └── lpi2c_adapter.c │ ├── lists │ │ ├── generic_list.c │ │ └── generic_list.h │ ├── serial_manager │ │ ├── serial_manager.c │ │ ├── serial_manager.h │ │ ├── serial_port_internal.h │ │ ├── serial_port_uart.c │ │ └── serial_port_uart.h │ └── uart │ │ ├── lpuart_adapter.c │ │ └── uart.h │ ├── device │ ├── MIMXRT1062.h │ ├── MIMXRT1062_features.h │ ├── fsl_device_registers.h │ ├── system_MIMXRT1062.c │ └── system_MIMXRT1062.h │ ├── doc │ └── amazon-freertos │ │ ├── ChangeLogKSDK.txt │ │ ├── directories.txt │ │ ├── freertos │ │ └── portable │ │ │ └── readme.txt │ │ └── license │ │ └── directories.txt │ ├── drivers │ ├── freertos │ │ ├── fsl_lpi2c_freertos.c │ │ ├── fsl_lpi2c_freertos.h │ │ ├── fsl_lpspi_freertos.c │ │ └── fsl_lpspi_freertos.h │ ├── fsl_clock.c │ ├── fsl_clock.h │ ├── fsl_common.c │ ├── fsl_common.h │ ├── fsl_dmamux.c │ ├── fsl_dmamux.h │ ├── fsl_edma.c │ ├── fsl_edma.h │ ├── fsl_gpio.c │ ├── fsl_gpio.h │ ├── fsl_iomuxc.h │ ├── fsl_lpi2c.c │ ├── fsl_lpi2c.h │ ├── fsl_lpspi.c │ ├── fsl_lpspi.h │ ├── fsl_lpuart.c │ ├── fsl_lpuart.h │ ├── fsl_pwm.c │ ├── fsl_pwm.h │ ├── fsl_semc.c │ ├── fsl_semc.h │ ├── fsl_snvs_hp.c │ ├── fsl_snvs_hp.h │ ├── fsl_usdhc.c │ ├── fsl_usdhc.h │ ├── fsl_xbara.c │ └── fsl_xbara.h │ ├── libs │ └── libarm_cortexM7lfsp_math.a │ ├── osa │ ├── usb_osa.h │ ├── usb_osa_freertos.c │ └── usb_osa_freertos.h │ ├── platform_slmx4 │ ├── slmx4_freertos.c │ └── slmx4_freertos.h │ ├── source │ ├── FreeRTOSConfig.h │ ├── ffconf.h │ ├── mat_handler.c │ ├── mat_handler.h │ ├── project.h │ ├── semihost_hardfault.c │ ├── usb_device_config.h │ ├── usb_device_descriptor.c │ ├── usb_device_descriptor.h │ ├── virtual_com.c │ ├── virtual_com.h │ ├── x4_post_norm.c │ └── x4_post_norm.h │ ├── startup │ └── startup_mimxrt1062.c │ ├── usb │ ├── device │ │ ├── class │ │ │ ├── cdc │ │ │ │ ├── usb_device_cdc_acm.c │ │ │ │ └── usb_device_cdc_acm.h │ │ │ ├── usb_device_class.c │ │ │ └── usb_device_class.h │ │ ├── include │ │ │ └── usb_device.h │ │ └── source │ │ │ ├── ehci │ │ │ ├── usb_device_ehci.c │ │ │ └── usb_device_ehci.h │ │ │ ├── usb_device_ch9.c │ │ │ ├── usb_device_ch9.h │ │ │ ├── usb_device_dci.c │ │ │ └── usb_device_dci.h │ ├── include │ │ ├── usb.h │ │ ├── usb_misc.h │ │ └── usb_spec.h │ └── phy │ │ ├── usb_phy.c │ │ └── usb_phy.h │ ├── utilities │ ├── fsl_debug_console.c │ ├── fsl_debug_console.h │ ├── fsl_debug_console_conf.h │ ├── fsl_str.c │ └── fsl_str.h │ ├── xethru_xep │ ├── 8051_firmware.h │ ├── x4driver.c │ ├── x4driver.h │ ├── x4driver.md │ └── xtcompiler.h │ └── xip │ ├── fsl_flexspi_nor_boot.c │ ├── fsl_flexspi_nor_boot.h │ ├── slmx4_flexspi_nor_config.c │ ├── slmx4_flexspi_nor_config.h │ ├── slmx4_sdram_ini_dcd.c │ └── slmx4_sdram_ini_dcd.h ├── unboxing_quick_start └── readme.md └── usb_driver ├── README.md └── inf ├── cdc.cat └── fsl_ucwxp.inf /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.exe 3 | *.dll 4 | *.s19 5 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman 2 | title: SensorLogic Radar Modules 3 | description: "Modules based on the Xethru-X4 Ultra-wideband (UWB) Impulse Radar" 4 | show_downloads: true 5 | -------------------------------------------------------------------------------- /assets/css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "{{ site.theme }}"; 5 | 6 | .inner { 7 | max-width: 60%; 8 | } 9 | -------------------------------------------------------------------------------- /docs/SLMX4_Data_Sheet_2022.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/SLMX4_Data_Sheet_2022.pdf -------------------------------------------------------------------------------- /docs/XTAN-13_XeThruX4RadarUserGuide_rev_a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/XTAN-13_XeThruX4RadarUserGuide_rev_a.pdf -------------------------------------------------------------------------------- /docs/epam_fov/azi/epam_azi_7.1GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/azi/epam_azi_7.1GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/azi/epam_azi_7.2GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/azi/epam_azi_7.2GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/azi/epam_azi_7.3GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/azi/epam_azi_7.3GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/azi/epam_azi_7.4GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/azi/epam_azi_7.4GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/azi/epam_azi_7.5GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/azi/epam_azi_7.5GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/elev/epam_elev_7.1GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/elev/epam_elev_7.1GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/elev/epam_elev_7.2GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/elev/epam_elev_7.2GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/elev/epam_elev_7.3GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/elev/epam_elev_7.3GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/elev/epam_elev_7.4GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/elev/epam_elev_7.4GHz.png -------------------------------------------------------------------------------- /docs/epam_fov/elev/epam_elev_7.5GHz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/epam_fov/elev/epam_elev_7.5GHz.png -------------------------------------------------------------------------------- /docs/mech/SLMX4-Base 2P1 PCB Mechanical.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/docs/mech/SLMX4-Base 2P1 PCB Mechanical.PDF -------------------------------------------------------------------------------- /firmware/readme.md: -------------------------------------------------------------------------------- 1 | # SLMX4 Module Documentation 2 | 3 | ## User Guides 4 | 5 | - [SLMX4 Health App](health_app.md) 6 | - [SLMX4 Firmware Update](insecure_fw_update.md) 7 | 8 | ## FW Downloads 9 | 10 | - [SLMX4-Base Health Firmware](https://www.dropbox.com/s/nkkn8px5ii1hrya/slmx4_base_usb_vcom_pb_dsp-epam0P1.s19?dl=1) 11 | - [SLMX4-Base MATLAB Firmware](https://www.dropbox.com/s/c5zcghxnware9ck/slmx4_base_usb_vcom_xep_matlab_server.s19?dl=1) 12 | 13 | ## App Downloads 14 | 15 | - [SLMX4 Health App](https://www.dropbox.com/s/8uffmmg2k6pqq62/slmx4_health_ui_usb.zip?dl=1) 16 | - [Python Wrapper + App](../python) 17 | 18 | [Back](../) 19 | -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/1.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/10.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/11.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/12.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/13.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/2.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/3.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/4.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/5.PNG -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/6.PNG -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/7.PNG -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/8.png -------------------------------------------------------------------------------- /images/MCUXpresso_firmware_update/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/MCUXpresso_firmware_update/9.png -------------------------------------------------------------------------------- /images/firmware_update/boot_util_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/firmware_update/boot_util_1.png -------------------------------------------------------------------------------- /images/firmware_update/boot_util_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/firmware_update/boot_util_2.png -------------------------------------------------------------------------------- /images/firmware_update/boot_util_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/firmware_update/boot_util_3.png -------------------------------------------------------------------------------- /images/firmware_update/boot_util_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/firmware_update/boot_util_4.png -------------------------------------------------------------------------------- /images/firmware_update/boot_util_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/firmware_update/boot_util_5.png -------------------------------------------------------------------------------- /images/firmware_update/slmx4_base_fw_update_boot_pins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/firmware_update/slmx4_base_fw_update_boot_pins.jpg -------------------------------------------------------------------------------- /images/firmware_update/slmx4_base_normal_boot_pins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/firmware_update/slmx4_base_normal_boot_pins.jpg -------------------------------------------------------------------------------- /images/health_app/fast_movement_reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/health_app/fast_movement_reset.png -------------------------------------------------------------------------------- /images/health_app/presence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/health_app/presence.png -------------------------------------------------------------------------------- /images/health_app/respiration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/health_app/respiration.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/1.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/10.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/11.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/2.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/3.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/4.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/5.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/6.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/7.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/8.png -------------------------------------------------------------------------------- /images/initial_unboxing_and_setup/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/initial_unboxing_and_setup/9.png -------------------------------------------------------------------------------- /images/matlab/basic_capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/matlab/basic_capture.png -------------------------------------------------------------------------------- /images/matlab/timer_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/matlab/timer_test.png -------------------------------------------------------------------------------- /images/matlab/virtual_com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/matlab/virtual_com.png -------------------------------------------------------------------------------- /images/sli_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/sli_logo.png -------------------------------------------------------------------------------- /images/slmx4-base_epam0p2_system_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/slmx4-base_epam0p2_system_architecture.png -------------------------------------------------------------------------------- /images/slmx4_epam0p1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/slmx4_epam0p1.PNG -------------------------------------------------------------------------------- /images/slmx4_white_render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/slmx4_white_render.png -------------------------------------------------------------------------------- /images/usb/usb_driver1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver1.png -------------------------------------------------------------------------------- /images/usb/usb_driver2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver2.png -------------------------------------------------------------------------------- /images/usb/usb_driver3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver3.png -------------------------------------------------------------------------------- /images/usb/usb_driver4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver4.png -------------------------------------------------------------------------------- /images/usb/usb_driver5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver5.png -------------------------------------------------------------------------------- /images/usb/usb_driver6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver6.png -------------------------------------------------------------------------------- /images/usb/usb_driver7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver7.png -------------------------------------------------------------------------------- /images/usb/usb_driver8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/images/usb/usb_driver8.png -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 SensorLogic, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /matlab/vcom_test.m: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % vcom_test.m 3 | % 4 | % This is a demonstration how to use the class *vcom_xep_radar_connector* 5 | % 6 | % Copyright: 2020 Sensor Logic 7 | % Written by: Justin Hadella 8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 9 | clear; 10 | clc; 11 | 12 | r = vcom_xep_radar_connector('COM4'); % adjust for *your* COM port! 13 | r.Open('X4'); 14 | 15 | % As a side-effect many settings on write will cause the numSamplers 16 | % variable to update 17 | fprintf('bins = %d\n', r.numSamplers); 18 | 19 | % Actually every variable from the radar is requested in this manner. 20 | iterations = r.Item('iterations'); 21 | fprintf('iterations = %d\n', iterations); 22 | 23 | % Setting some variables 24 | r.TryUpdateChip('rx_wait', 0); 25 | r.TryUpdateChip('frame_start', 0); 26 | r.TryUpdateChip('frame_end', 4.0); 27 | r.TryUpdateChip('ddc_en', 1); 28 | 29 | % Set up time plot signal 30 | frameSize = r.numSamplers; % Get # bins/samplers in a frame 31 | frame = zeros(1, frameSize); % Preallocate frame 32 | h_fig = figure; 33 | ax1 = gca; 34 | h1 = plot(ax1, 1:frameSize, frame); 35 | title(ax1, 'radar time waveform'); 36 | xlabel(ax1, 'bin'); 37 | ylabel(ax1, 'amplitude'); 38 | 39 | % Plot data while window is open 40 | while isgraphics(h_fig) 41 | try 42 | % frame = abs(r.GetFrameRawDouble); 43 | frame = abs(r.GetFrameNormalizedDouble); 44 | 45 | set(h1, 'xdata', 1:frameSize, 'ydata', frame); 46 | drawnow; 47 | catch ME 48 | end 49 | end 50 | 51 | r.Close(); 52 | -------------------------------------------------------------------------------- /protocol_buffers/slmx4_usb_vcom.options: -------------------------------------------------------------------------------- 1 | msg_payload_vector_t.vec max_count:1536 2 | msg_payload_str_t.str max_size:256 3 | msg_payload_data_copy_t.data fixed_length:true max_size:256 4 | msg_payload_wifi_record_t.bssid fixed_length:true max_size:6 5 | msg_payload_wifi_record_t.ssid max_size:32 6 | msg_payload_platform_status_t.init_fail fixed_length:true max_size:11 7 | msg_payload_health_t.debug max_count:8 8 | msg_payload_log_data_t.data fixed_length:true max_size:2048 9 | 10 | -------------------------------------------------------------------------------- /python/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ -------------------------------------------------------------------------------- /python/README.md: -------------------------------------------------------------------------------- 1 | # SLMX4 Health Python Wrapper 2 | 3 | [Back](../) 4 | 5 | > This folder contains python code for interaction with the SLM-X4 module running the 6 | [health firmware](https://www.dropbox.com/s/nkkn8px5ii1hrya/slmx4_base_usb_vcom_pb_dsp-epam0P1.s19?dl=1). 7 | 8 | The [slmx4_health_wrapper.py](slmx4_health_wrapper.py) file contains an interface which allows 9 | python to interact with the SLM-X4 running the health firmware. 10 | 11 | ## Health Firmware Protocol 12 | 13 | > The health firmware that the python wrapper uses operates on the USB port as a Virtual COM port. 14 | On a Windows system, the device will show up in the 'Device Manager' with an identification such 15 | as 'COM6'. On Linux, the identification will typically be `/dev/ttyACM0`. 16 | 17 | The health firmware uses USB as the physical interface. On top of that, the health firmware passes 18 | messages using Protocol Buffers. The [`slmx4_usb_vcom_pb2.py`](slmx4_usb_vcom_pb2.py) file contains 19 | the specific protocol buffer specification in python. 20 | 21 | > The `slmx4_usb_vcom_pb2.py` specification includes definitions used outside of the health firmware. 22 | The included wrapper accesses the necessary functions to operate the health firmware only! 23 | 24 | ## Python Dependencies 25 | 26 | The python wrapper uses mostly standard python3 modules. However, since the USB port is used we need 27 | a serial interface, `pyserial` in this case. Installation using pip is the same on Windows and Linux. 28 | 29 | > On Windows you may need to have admininistrative privileges... 30 | 31 | To install `pyserial`: 32 | ``` 33 | python3 -m pip install pyserial 34 | ``` 35 | 36 | There is also a demo which plots the respiration waveform. This requires use of `matplotlib`. 37 | 38 | To install `matplotlib`: 39 | ``` 40 | python3 -m pip install -U matplotlib 41 | ``` 42 | 43 | The final dependency is protocol buffers itself. 44 | 45 | ### Windows - Protocol Buffers 46 | 47 | 1. Download the appropriate precompiled version of proto from this [link](https://github.com/protocolbuffers/protobuf/releases) 48 | and unzip the folder to some location on your PC. 49 | 2. Add the path to the folder's bin directory to your installation's Environmental Variables. 50 | 3. Clone the [protocol buffers](https://github.com/protocolbuffers/protobuf) repository. 51 | 3. In the python folder 52 | ``` 53 | python3 setup.py install 54 | ``` 55 | 56 | ### Linux - Protocol Buffers 57 | 58 | To install protocol buffers on Ubuntu Linux: 59 | ``` 60 | sudo apt update 61 | sudo apt install protobuf-compiler 62 | ``` 63 | 64 | ## Python Demos 65 | 66 | There are a number of example python demonstrations. 67 | 68 | - [slmx4_health_polling_demo.py](slmx4_health_polling_demo.py) 69 | The demonstrates how to manually trigger (or poll) the radar on the SLM-X4. _This is not recommended 70 | to due to measurement time jitter which may affect respiration calculations._ 71 | 72 | - [slmx4_health_streaming_demo.py](slmx4_health_streaming_demo.py) 73 | This demonstrates how data streaming works. The SLM-X4 once data streaming starts will generate 74 | and process radar data at a fixed rate with little jitter. 75 | 76 | - [slmx4_health_streaming_plot_demo.py](slmx4_health_streaming_plot_demo.py) 77 | This is similar to the streaming demo except the respiration waveform is plotted in addition to 78 | the data shown on the terminal 79 | 80 | > The python demos have been tested on Ubuntu Linux 20.04 LTS and Windows 10. 81 | -------------------------------------------------------------------------------- /python/slmx4_health_debug.py: -------------------------------------------------------------------------------- 1 | """ 2 | Contains a collection of helper functions to print the contents of messages 3 | from the SLM-X4 Health Firmware 4 | 5 | Copyright (C) 2022 Sensor Logic 6 | Written by Justin Hadella 7 | """ 8 | import slmx4_usb_vcom_pb2 as pb 9 | 10 | def debug_health(msg): 11 | # Function prints out the Health message data if appropriate 12 | if msg.opcode == pb.HEALTH_MSG: 13 | health = msg.health 14 | print('presence_detected =', health.presence_detected) 15 | print('respiration_detected =', health.respiration_detected) 16 | print('movement_detected =', health.movement_detected) 17 | print('movement_type =', health.movement_type) 18 | print('distance =', health.distance) 19 | print('distance_conf =', health.distance_conf) 20 | print('respiration_rpm =', health.respiration_rpm) 21 | print('respiration_conf =', health.respiration_conf) 22 | print('rms =', health.rms) 23 | print('temperature =', health.temperature) 24 | print('humidity =', health.humidity) 25 | print('lux =', health.lux) 26 | print('frame count =', health.debug[0]) 27 | print('minutes =', health.debug[1]) 28 | 29 | def debug_resp_wave(msg): 30 | # Function prints out the Respiration Waveform data if appropriate 31 | if msg.opcode == pb.ONE_SHOT: 32 | resp_wave = msg.vector 33 | print('len =', resp_wave.len) 34 | print('vec = [', end='') 35 | for i in range(resp_wave.len): 36 | print(resp_wave.vec[i], end=' ') 37 | print(']') -------------------------------------------------------------------------------- /python/slmx4_health_polling_demo.py: -------------------------------------------------------------------------------- 1 | """ 2 | Example how to operate the SLM-X4 Health firmware using a manual 3 | polling technique. 4 | 5 | Note: 6 | By using manual polling, there is likely going to be much more 7 | jitter than by using streaming which locks the radar framerate 8 | to a fixed amount. 9 | 10 | Copyright (C) 2022 Sensor Logic 11 | Written by Justin Hadella 12 | """ 13 | import os 14 | import time 15 | 16 | from slmx4_health_wrapper import slmx4_health 17 | from slmx4_health_debug import * 18 | 19 | # Create a instance of the slmx4 health wrapper 20 | slmx4 = slmx4_health('/dev/ttyACM0') # Linux 21 | # slmx4 = slmx4_health('COM3') # Windows 22 | 23 | # Open the USB VCOM connection 24 | slmx4.open() 25 | 26 | # Get the version info and display 27 | ver = slmx4.get_version() 28 | print('ver =', ver) 29 | 30 | # The version info is a tuple which indicates: 31 | # (firmware name, firmwave version, protocol version) 32 | 33 | print('Press CTRL-C to terminate loop') 34 | 35 | # Delay 1 second to give user time to see version info and prompt 36 | time.sleep(1) 37 | 38 | # Run loop until the user presses CTRL-C 39 | try: 40 | while True: 41 | # Trigger a single radar measurement 42 | health, resp_wave = slmx4.one_shot() 43 | 44 | if os.name == 'nt': 45 | os.system('cls') 46 | else: 47 | os.system('clear') 48 | 49 | debug_health(health) 50 | debug_resp_wave(resp_wave) 51 | 52 | # Delay 100 ms to simulate 10 FPS data rate 53 | time.sleep(0.1) 54 | 55 | except KeyboardInterrupt: 56 | pass 57 | 58 | # Close the USB VCOM connection 59 | slmx4.close() -------------------------------------------------------------------------------- /python/slmx4_health_streaming_demo.py: -------------------------------------------------------------------------------- 1 | """ 2 | Example how to operate the SLM-X4 Health firmware using a data 3 | streaming technique. 4 | 5 | Note: 6 | The radar data rate is fixed in hardware at 10 frames/second. 7 | 8 | Copyright (C) 2022 Sensor Logic 9 | Written by Justin Hadella 10 | """ 11 | import os 12 | import time 13 | 14 | from slmx4_health_wrapper import slmx4_health 15 | from slmx4_health_debug import * 16 | 17 | # Create a instance of the slmx4 health wrapper 18 | slmx4 = slmx4_health('/dev/ttyACM0') # Linux 19 | # slmx4 = slmx4_health('COM3') # Windows 20 | 21 | # Open the USB VCOM connection 22 | slmx4.open() 23 | 24 | # Get the version info and display 25 | ver = slmx4.get_version() 26 | print('ver =', ver) 27 | 28 | # The version info is a tuple which indicates: 29 | # (firmware name, firmwave version, protocol version) 30 | 31 | print('Press CTRL-C to terminate loop') 32 | 33 | # Delay 1 second to give user time to see version info and prompt 34 | time.sleep(1) 35 | 36 | # Start data streaming at fixed rate 37 | slmx4.start() 38 | 39 | # Run loop until the user presses CTRL-C 40 | try: 41 | while True: 42 | # When data streaming, the SLM-X4 will send two messages back-to-back: 43 | # the health message, followed by the respiration waveform 44 | health = slmx4.read_msg() 45 | resp_wave = slmx4.read_msg() 46 | 47 | if os.name == 'nt': 48 | os.system('cls') 49 | else: 50 | os.system('clear') 51 | 52 | debug_health(health) 53 | # debug_resp_wave(resp_wave) 54 | 55 | except KeyboardInterrupt: 56 | pass 57 | 58 | # Stop data streaming 59 | slmx4.stop() 60 | 61 | # Close the USB VCOM connection 62 | slmx4.close() -------------------------------------------------------------------------------- /python/slmx4_health_streaming_plot_demo.py: -------------------------------------------------------------------------------- 1 | """ 2 | Example how to operate the SLM-X4 Health firmware using a data 3 | streaming technique. 4 | 5 | Note: 6 | The radar data rate is fixed in hardware at 10 frames/second. 7 | 8 | Note: 9 | This version also plots the respiration waveform in a matplotlib 10 | window. The interval argument is made small so the true rate is 11 | based on the rate that the health & respiration data arrive. 12 | 13 | Copyright (C) 2022 Sensor Logic 14 | Written by Justin Hadella 15 | """ 16 | import os 17 | import matplotlib.pyplot as plt 18 | 19 | from matplotlib.animation import FuncAnimation 20 | 21 | from slmx4_health_wrapper import slmx4_health 22 | from slmx4_health_debug import * 23 | 24 | def animate(i): 25 | # When data streaming, the SLM-X4 will send two messages back-to-back: 26 | # the health message, followed by the respiration waveform 27 | health = slmx4.read_msg() 28 | resp_wave = slmx4.read_msg() 29 | 30 | if os.name == 'nt': 31 | os.system('cls') 32 | else: 33 | os.system('clear') 34 | 35 | # Display the health info on the terminal 36 | debug_health(health) 37 | 38 | # Get the frame counter value 39 | fc = health.health.debug[0] 40 | 41 | # Add the frame counter to the plot title 42 | title = 'Respiration Waveform (fc =' + str(fc) + ')' 43 | 44 | x = range(resp_wave.vector.len) 45 | y = resp_wave.vector.vec 46 | 47 | ax.clear() 48 | ax.plot(x, y) 49 | 50 | ax.set_xlim([0, resp_wave.vector.len]) 51 | ax.set_ylim([-2, 2]) 52 | ax.set_title(title) 53 | 54 | # Create the plot window 55 | fig, ax = plt.subplots() 56 | 57 | # Create a instance of the slmx4 health wrapper 58 | slmx4 = slmx4_health('/dev/ttyACM0') # Linux 59 | # slmx4 = slmx4_health('COM3') # Windows 60 | 61 | # Open the USB VCOM connection 62 | slmx4.open() 63 | 64 | # Start data streaming at fixed rate 65 | slmx4.start() 66 | 67 | # The data streaming/plotting is in animate() 68 | ani = FuncAnimation(fig, animate, interval=10) 69 | plt.show() 70 | 71 | # Stop data streaming 72 | slmx4.stop() 73 | 74 | # Close the USB VCOM connection 75 | slmx4.close() -------------------------------------------------------------------------------- /slmx4_projects/button_demo/.gitignore: -------------------------------------------------------------------------------- 1 | /Debug/ 2 | /.settings/ 3 | *.launch 4 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | button_demo 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | com.nxp.mcuxpresso.core.datamodels.sdkNature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/CMSIS/arm_const_structs.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Project: CMSIS DSP Library 3 | * Title: arm_const_structs.h 4 | * Description: Constant structs that are initialized for user convenience. 5 | * For example, some can be given as arguments to the arm_cfft_f32() function. 6 | * 7 | * $Date: 27. January 2017 8 | * $Revision: V.1.5.1 9 | * 10 | * Target Processor: Cortex-M cores 11 | * -------------------------------------------------------------------- */ 12 | /* 13 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved. 14 | * 15 | * SPDX-License-Identifier: Apache-2.0 16 | * 17 | * Licensed under the Apache License, Version 2.0 (the License); you may 18 | * not use this file except in compliance with the License. 19 | * You may obtain a copy of the License at 20 | * 21 | * www.apache.org/licenses/LICENSE-2.0 22 | * 23 | * Unless required by applicable law or agreed to in writing, software 24 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26 | * See the License for the specific language governing permissions and 27 | * limitations under the License. 28 | */ 29 | 30 | #ifndef _ARM_CONST_STRUCTS_H 31 | #define _ARM_CONST_STRUCTS_H 32 | 33 | #include "arm_math.h" 34 | #include "arm_common_tables.h" 35 | 36 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16; 37 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32; 38 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64; 39 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128; 40 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256; 41 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512; 42 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024; 43 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048; 44 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096; 45 | 46 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16; 47 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32; 48 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64; 49 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128; 50 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256; 51 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512; 52 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024; 53 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048; 54 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096; 55 | 56 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16; 57 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32; 58 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64; 59 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128; 60 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256; 61 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512; 62 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024; 63 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048; 64 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/CMSIS/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/amazon-freertos/freertos/portable/ReadMe.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://www.freertos.org/a00111.html 5 | IDList= 6 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/amazon-freertos/freertos/portable/heap_3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel V10.2.0 3 | * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | * this software and associated documentation files (the "Software"), to deal in 7 | * the Software without restriction, including without limitation the rights to 8 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | * the Software, and to permit persons to whom the Software is furnished to do so, 10 | * subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * 22 | * http://www.FreeRTOS.org 23 | * http://aws.amazon.com/freertos 24 | * 25 | * 1 tab == 4 spaces! 26 | */ 27 | 28 | 29 | /* 30 | * Implementation of pvPortMalloc() and vPortFree() that relies on the 31 | * compilers own malloc() and free() implementations. 32 | * 33 | * This file can only be used if the linker is configured to to generate 34 | * a heap memory area. 35 | * 36 | * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the 37 | * memory management pages of http://www.FreeRTOS.org for more information. 38 | */ 39 | 40 | #include 41 | 42 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 43 | all the API functions to use the MPU wrappers. That should only be done when 44 | task.h is included from an application file. */ 45 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 46 | 47 | #include "FreeRTOS.h" 48 | #include "task.h" 49 | 50 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 51 | 52 | #if( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) 53 | #error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0 54 | #endif 55 | 56 | /*-----------------------------------------------------------*/ 57 | 58 | void *pvPortMalloc( size_t xWantedSize ) 59 | { 60 | void *pvReturn; 61 | 62 | vTaskSuspendAll(); 63 | { 64 | pvReturn = malloc( xWantedSize ); 65 | traceMALLOC( pvReturn, xWantedSize ); 66 | } 67 | ( void ) xTaskResumeAll(); 68 | 69 | #if( configUSE_MALLOC_FAILED_HOOK == 1 ) 70 | { 71 | if( pvReturn == NULL ) 72 | { 73 | extern void vApplicationMallocFailedHook( void ); 74 | vApplicationMallocFailedHook(); 75 | } 76 | } 77 | #endif 78 | 79 | return pvReturn; 80 | } 81 | /*-----------------------------------------------------------*/ 82 | 83 | void vPortFree( void *pv ) 84 | { 85 | if( pv ) 86 | { 87 | vTaskSuspendAll(); 88 | { 89 | free( pv ); 90 | traceFREE( pv, 0 ); 91 | } 92 | ( void ) xTaskResumeAll(); 93 | } 94 | } 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/amazon-freertos/include/threading_alt.h: -------------------------------------------------------------------------------- 1 | #ifndef __THREADING_ALT_H__ 2 | #define __THREADING_ALT_H__ 3 | 4 | 5 | #include "FreeRTOS.h" 6 | #include "semphr.h" 7 | 8 | typedef struct 9 | { 10 | SemaphoreHandle_t mutex; 11 | char is_valid; 12 | } mbedtls_threading_mutex_t; 13 | 14 | extern void mbedtls_threading_set_alt( void ( * mutex_init )( mbedtls_threading_mutex_t * ), 15 | void ( * mutex_free )( mbedtls_threading_mutex_t * ), 16 | int ( * mutex_lock )( mbedtls_threading_mutex_t * ), 17 | int ( * mutex_unlock )( mbedtls_threading_mutex_t * ) ); 18 | 19 | 20 | #endif /* ifndef __THREADING_ALT_H__ */ 21 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/amazon-freertos/license/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/board/peripherals.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef _PERIPHERALS_H_ 7 | #define _PERIPHERALS_H_ 8 | 9 | /*********************************************************************************************************************** 10 | * Included files 11 | **********************************************************************************************************************/ 12 | #include "fsl_common.h" 13 | 14 | #if defined(__cplusplus) 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | /*********************************************************************************************************************** 19 | * Initialization functions 20 | **********************************************************************************************************************/ 21 | 22 | void BOARD_InitPeripherals(void); 23 | 24 | /*********************************************************************************************************************** 25 | * BOARD_InitBootPeripherals function 26 | **********************************************************************************************************************/ 27 | void BOARD_InitBootPeripherals(void); 28 | 29 | #if defined(__cplusplus) 30 | } 31 | #endif 32 | 33 | #endif /* _PERIPHERALS_H_ */ 34 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/component/serial_manager/serial_port_uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef __SERIAL_PORT_UART_H__ 10 | #define __SERIAL_PORT_UART_H__ 11 | 12 | /*! 13 | * @addtogroup serial_port_uart 14 | * @{ 15 | */ 16 | 17 | /******************************************************************************* 18 | * Definitions 19 | ******************************************************************************/ 20 | /*! @brief serial port uart handle size*/ 21 | #if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U)) 22 | #define SERIAL_PORT_UART_HANDLE_SIZE (166U) 23 | #else 24 | #define SERIAL_PORT_UART_HANDLE_SIZE (4U) 25 | #endif 26 | 27 | /*! @brief serial port uart parity mode*/ 28 | typedef enum _serial_port_uart_parity_mode 29 | { 30 | kSerialManager_UartParityDisabled = 0x0U, /*!< Parity disabled */ 31 | kSerialManager_UartParityEven = 0x1U, /*!< Parity even enabled */ 32 | kSerialManager_UartParityOdd = 0x2U, /*!< Parity odd enabled */ 33 | } serial_port_uart_parity_mode_t; 34 | 35 | /*! @brief serial port uart stop bit count*/ 36 | typedef enum _serial_port_uart_stop_bit_count 37 | { 38 | kSerialManager_UartOneStopBit = 0U, /*!< One stop bit */ 39 | kSerialManager_UartTwoStopBit = 1U, /*!< Two stop bits */ 40 | } serial_port_uart_stop_bit_count_t; 41 | 42 | /*! @brief serial port uart config struct*/ 43 | typedef struct _serial_port_uart_config 44 | { 45 | uint32_t clockRate; /*!< clock rate */ 46 | uint32_t baudRate; /*!< baud rate */ 47 | serial_port_uart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */ 48 | serial_port_uart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */ 49 | uint8_t instance; /*!< Instance (0 - UART0, 1 - UART1, ...), detail information 50 | please refer to the SOC corresponding RM. */ 51 | uint8_t enableRx; /*!< Enable RX */ 52 | uint8_t enableTx; /*!< Enable TX */ 53 | } serial_port_uart_config_t; 54 | /*! @} */ 55 | #endif /* __SERIAL_PORT_UART_H__ */ 56 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/device/fsl_device_registers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 Freescale Semiconductor, Inc. 3 | * Copyright 2016-2018 NXP 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * 7 | */ 8 | 9 | #ifndef __FSL_DEVICE_REGISTERS_H__ 10 | #define __FSL_DEVICE_REGISTERS_H__ 11 | 12 | /* 13 | * Include the cpu specific register header files. 14 | * 15 | * The CPU macro should be declared in the project or makefile. 16 | */ 17 | #if (defined(CPU_MIMXRT1062CVJ5A) || defined(CPU_MIMXRT1062CVL5A) || defined(CPU_MIMXRT1062DVJ6A) || \ 18 | defined(CPU_MIMXRT1062DVL6A)) 19 | 20 | #define MIMXRT1062_SERIES 21 | 22 | /* CMSIS-style register definitions */ 23 | #include "MIMXRT1062.h" 24 | /* CPU specific feature definitions */ 25 | #include "MIMXRT1062_features.h" 26 | 27 | #else 28 | #error "No valid CPU defined!" 29 | #endif 30 | 31 | #endif /* __FSL_DEVICE_REGISTERS_H__ */ 32 | 33 | /******************************************************************************* 34 | * EOF 35 | ******************************************************************************/ 36 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/doc/amazon-freertos/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the directories found at the root of the Amazon FreeRTOS 2 | distribution. 3 | 4 | lib: 5 | Contains the implementation of AWS and third party libraries. AWS libraries use 6 | abstracted interfaces to enable interchangeability and facilitate porting to new 7 | hardware. 8 | 9 | demos: 10 | Contains a set of pre-configured demo projects for various target platforms. 11 | The projects in the demos directory build the libraries from the lib directory. 12 | 13 | tests: 14 | Various module and integration tests that use the Unity framework. These tests 15 | also support the Amazon FreeRTOS Qualification Program (AFQP). 16 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/doc/amazon-freertos/freertos/portable/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and/or compiler. 4 | 5 | 6 | + The FreeRTOS/Source/Portable/MemMang directory contains the five sample 7 | memory allocators as described on the http://www.FreeRTOS.org WEB site. 8 | 9 | + The other directories each contain files specific to a particular 10 | microcontroller or compiler, where the directory name denotes the compiler 11 | specific files the directory contains. 12 | 13 | 14 | 15 | For example, if you are interested in the [compiler] port for the [architecture] 16 | microcontroller, then the port specific files are contained in 17 | FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the 18 | only port you are interested in then all the other directories can be 19 | ignored. 20 | 21 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/doc/amazon-freertos/license/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the subdirectories found in the /lib directory of the Amazon 2 | FreeRTOS distribution. 3 | 4 | third_party: 5 | Contains the third party libraries, including vendor supplied device specific 6 | driver libraries, required to build target specific demo projects. Organized by 7 | vendor. 8 | 9 | All other directories: 10 | Contain the implementation of a single Amazon FreeRTOS library. -------------------------------------------------------------------------------- /slmx4_projects/button_demo/drivers/freertos/fsl_lpi2c_freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | #ifndef __FSL_LPI2C_FREERTOS_H__ 9 | #define __FSL_LPI2C_FREERTOS_H__ 10 | 11 | #include "FreeRTOS.h" 12 | #include "portable.h" 13 | #include "semphr.h" 14 | 15 | #include "fsl_lpi2c.h" 16 | 17 | /*! 18 | * @addtogroup lpi2c_freertos_driver LPI2C FreeRTOS driver 19 | * @{ 20 | */ 21 | 22 | /******************************************************************************* 23 | * Definitions 24 | ******************************************************************************/ 25 | 26 | /*! @name Driver version */ 27 | /*@{*/ 28 | /*! @brief LPI2C freertos driver version 2.1.5. */ 29 | #define FSL_LPI2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 1, 5)) 30 | /*@}*/ 31 | 32 | /*! 33 | * @cond RTOS_PRIVATE 34 | * @brief LPI2C FreeRTOS handle 35 | */ 36 | typedef struct _lpi2c_rtos_handle 37 | { 38 | LPI2C_Type *base; /*!< LPI2C base address */ 39 | lpi2c_master_handle_t drv_handle; /*!< Handle of the underlying driver, treated as opaque by the RTOS layer */ 40 | status_t async_status; 41 | SemaphoreHandle_t mutex; /*!< Mutex to lock the handle during a trasfer */ 42 | SemaphoreHandle_t semaphore; /*!< Semaphore to notify and unblock task when transfer ends */ 43 | } lpi2c_rtos_handle_t; 44 | /*! \endcond */ 45 | 46 | /******************************************************************************* 47 | * API 48 | ******************************************************************************/ 49 | 50 | #if defined(__cplusplus) 51 | extern "C" { 52 | #endif 53 | 54 | /*! 55 | * @name LPI2C RTOS Operation 56 | * @{ 57 | */ 58 | 59 | /*! 60 | * @brief Initializes LPI2C. 61 | * 62 | * This function initializes the LPI2C module and related RTOS context. 63 | * 64 | * @param handle The RTOS LPI2C handle, the pointer to an allocated space for RTOS context. 65 | * @param base The pointer base address of the LPI2C instance to initialize. 66 | * @param masterConfig Configuration structure to set-up LPI2C in master mode. 67 | * @param srcClock_Hz Frequency of input clock of the LPI2C module. 68 | * @return status of the operation. 69 | */ 70 | status_t LPI2C_RTOS_Init(lpi2c_rtos_handle_t *handle, 71 | LPI2C_Type *base, 72 | const lpi2c_master_config_t *masterConfig, 73 | uint32_t srcClock_Hz); 74 | 75 | /*! 76 | * @brief Deinitializes the LPI2C. 77 | * 78 | * This function deinitializes the LPI2C module and related RTOS context. 79 | * 80 | * @param handle The RTOS LPI2C handle. 81 | */ 82 | status_t LPI2C_RTOS_Deinit(lpi2c_rtos_handle_t *handle); 83 | 84 | /*! 85 | * @brief Performs I2C transfer. 86 | * 87 | * This function performs an I2C transfer using LPI2C module according to data given in the transfer structure. 88 | * 89 | * @param handle The RTOS LPI2C handle. 90 | * @param transfer Structure specifying the transfer parameters. 91 | * @return status of the operation. 92 | */ 93 | status_t LPI2C_RTOS_Transfer(lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer); 94 | 95 | /*! 96 | * @} 97 | */ 98 | 99 | #if defined(__cplusplus) 100 | } 101 | #endif 102 | 103 | /*! 104 | * @} 105 | */ 106 | 107 | #endif /* __FSL_LPI2C_FREERTOS_H__ */ 108 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/libs/libarm_cortexM7lfsp_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/slmx4_projects/button_demo/libs/libarm_cortexM7lfsp_math.a -------------------------------------------------------------------------------- /slmx4_projects/button_demo/readme.md: -------------------------------------------------------------------------------- 1 | # Button Demo 2 | 3 | Hardware required: 4 | - SLMX4-HW 5 | - epam-x4 (or other pin-compatible x4 module) 6 | 7 | This is a very simple demonstration of a "one-shot" timer in FREERTOS 8 | 9 | This program is based on the buttontime demo for the RT 1060 EVK board, but 10 | this uses two buttons: 11 | - User Button 1 -- Controls the Red LED 12 | - User Button 2 -- Controls the Green LED 13 | 14 | Initially, both LEDs will blink slow at 1 Hz rate. However, if a button is 15 | pressed briefly, that button's corresponding LED will then blink at a much 16 | higher rate. If the button is pressed for > 2 s, then it will blink at the 17 | slower rate again. -------------------------------------------------------------------------------- /slmx4_projects/button_demo/utilities/fsl_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | * 8 | */ 9 | 10 | #ifndef _FSL_STR_H 11 | #define _FSL_STR_H 12 | 13 | #include "fsl_common.h" 14 | 15 | /*! 16 | * @addtogroup debugconsole 17 | * @{ 18 | */ 19 | 20 | /******************************************************************************* 21 | * Prototypes 22 | ******************************************************************************/ 23 | #if defined(__cplusplus) 24 | extern "C" { 25 | #endif /* __cplusplus */ 26 | 27 | /*! 28 | * @brief A function pointer which is used when format printf log. 29 | */ 30 | typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len); 31 | 32 | /*! 33 | * @brief This function outputs its parameters according to a formatted string. 34 | * 35 | * @note I/O is performed by calling given function pointer using following 36 | * (*func_ptr)(c); 37 | * 38 | * @param[in] fmt Format string for printf. 39 | * @param[in] ap Arguments to printf. 40 | * @param[in] buf pointer to the buffer 41 | * @param cb print callbck function pointer 42 | * 43 | * @return Number of characters to be print 44 | */ 45 | int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb); 46 | 47 | /*! 48 | * @brief Converts an input line of ASCII characters based upon a provided 49 | * string format. 50 | * 51 | * @param[in] line_ptr The input line of ASCII data. 52 | * @param[in] format Format first points to the format string. 53 | * @param[in] args_ptr The list of parameters. 54 | * 55 | * @return Number of input items converted and assigned. 56 | * @retval IO_EOF When line_ptr is empty string "". 57 | */ 58 | int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr); 59 | 60 | #if defined(__cplusplus) 61 | } 62 | #endif /* __cplusplus */ 63 | 64 | /*! @} */ 65 | 66 | #endif /* _FSL_STR_H */ 67 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/xethru_xep/x4driver.md: -------------------------------------------------------------------------------- 1 | # X4 Driver 2 | 3 | This version of the x4driver is `3.4.7`. 4 | 5 | ## Legacy Conversion: 6 | | xep | fex4 | notes | 7 | | :-- | :--- | :---- | 8 | 9 | 10 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/xethru_xep/xtcompiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * 5 | */ 6 | 7 | #ifndef XTCOMPILER_H 8 | #define XTCOMPILER_H 9 | 10 | #ifdef UNUSED 11 | #elif defined(__GNUC__) 12 | // # define UNUSED(x) UNUSED_ ## x __attribute__ ((unused)) 13 | # define UNUSED(x) (void)(x) 14 | #elif defined(__LCLINT__) 15 | # define UNUSED(x) /*@unused@*/ x 16 | #elif defined(__cplusplus) 17 | # define UNUSED(x) 18 | #else 19 | # define UNUSED(x) x 20 | #endif 21 | 22 | 23 | 24 | #endif // XTCOMPILER_H -------------------------------------------------------------------------------- /slmx4_projects/button_demo/xip/fsl_flexspi_nor_boot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "fsl_flexspi_nor_boot.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_device" 13 | #endif 14 | 15 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 16 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 17 | __attribute__((section(".boot_hdr.ivt"))) 18 | #elif defined(__ICCARM__) 19 | #pragma location=".boot_hdr.ivt" 20 | #endif 21 | /************************************* 22 | * IVT Data 23 | *************************************/ 24 | const ivt image_vector_table = { 25 | IVT_HEADER, /* IVT Header */ 26 | IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ 27 | IVT_RSVD, /* Reserved = 0 */ 28 | (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ 29 | (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ 30 | (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ 31 | (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ 32 | IVT_RSVD /* Reserved = 0 */ 33 | }; 34 | 35 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 36 | __attribute__((section(".boot_hdr.boot_data"))) 37 | #elif defined(__ICCARM__) 38 | #pragma location=".boot_hdr.boot_data" 39 | #endif 40 | /************************************* 41 | * Boot Data 42 | *************************************/ 43 | const BOOT_DATA_T boot_data = { 44 | FLASH_BASE, /* boot start location */ 45 | FLASH_SIZE, /* size */ 46 | PLUGIN_FLAG, /* Plugin flag*/ 47 | 0xFFFFFFFF /* empty - extra data word */ 48 | }; 49 | #endif 50 | 51 | 52 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/xip/slmx4_flexspi_nor_config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "slmx4_flexspi_nor_config.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_board" 13 | #endif 14 | 15 | /******************************************************************************* 16 | * Code 17 | ******************************************************************************/ 18 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 19 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 20 | __attribute__((section(".boot_hdr.conf"))) 21 | #elif defined(__ICCARM__) 22 | #pragma location = ".boot_hdr.conf" 23 | #endif 24 | 25 | const flexspi_nor_config_t qspiflash_config = { 26 | .memConfig = 27 | { 28 | .tag = FLEXSPI_CFG_BLK_TAG, 29 | .version = FLEXSPI_CFG_BLK_VERSION, 30 | .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad, 31 | .csHoldTime = 3u, 32 | .csSetupTime = 3u, 33 | // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock 34 | .sflashPadType = kSerialFlash_4Pads, 35 | .serialClkFreq = kFlexSpiSerialClk_100MHz, 36 | .sflashA1Size = 4u * 1024u * 1024u, 37 | .lookupTable = 38 | { 39 | // Read LUTs 40 | FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18), 41 | FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04), 42 | }, 43 | }, 44 | .pageSize = 256u, 45 | .sectorSize = 4u * 1024u, 46 | .blockSize = 64u * 1024u, 47 | .isUniformBlockSize = false, 48 | }; 49 | #endif /* XIP_BOOT_HEADER_ENABLE */ 50 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo/xip/slmx4_sdram_ini_dcd.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef __SLMX4_SDRAM_INI_DCD__ 7 | #define __SLMX4_SDRAM_INI_DCD__ 8 | 9 | #include 10 | 11 | /*! @name Driver version */ 12 | /*@{*/ 13 | /*! @brief XIP_BOARD driver version 2.0.0. */ 14 | #define FSL_XIP_BOARD_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 15 | /*@}*/ 16 | 17 | /************************************* 18 | * DCD Data 19 | *************************************/ 20 | #define DCD_TAG_HEADER (0xD2) 21 | #define DCD_VERSION (0x41) 22 | #define DCD_TAG_HEADER_SHIFT (24) 23 | #define DCD_ARRAY_SIZE 1 24 | 25 | #endif /* __SLMX4_SDRAM_INI_DCD__ */ 26 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/.gitignore: -------------------------------------------------------------------------------- 1 | /Debug/ 2 | /.settings/ 3 | *.launch -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | button_demo2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | com.nxp.mcuxpresso.core.datamodels.sdkNature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/CMSIS/arm_const_structs.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Project: CMSIS DSP Library 3 | * Title: arm_const_structs.h 4 | * Description: Constant structs that are initialized for user convenience. 5 | * For example, some can be given as arguments to the arm_cfft_f32() function. 6 | * 7 | * $Date: 27. January 2017 8 | * $Revision: V.1.5.1 9 | * 10 | * Target Processor: Cortex-M cores 11 | * -------------------------------------------------------------------- */ 12 | /* 13 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved. 14 | * 15 | * SPDX-License-Identifier: Apache-2.0 16 | * 17 | * Licensed under the Apache License, Version 2.0 (the License); you may 18 | * not use this file except in compliance with the License. 19 | * You may obtain a copy of the License at 20 | * 21 | * www.apache.org/licenses/LICENSE-2.0 22 | * 23 | * Unless required by applicable law or agreed to in writing, software 24 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26 | * See the License for the specific language governing permissions and 27 | * limitations under the License. 28 | */ 29 | 30 | #ifndef _ARM_CONST_STRUCTS_H 31 | #define _ARM_CONST_STRUCTS_H 32 | 33 | #include "arm_math.h" 34 | #include "arm_common_tables.h" 35 | 36 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16; 37 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32; 38 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64; 39 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128; 40 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256; 41 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512; 42 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024; 43 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048; 44 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096; 45 | 46 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16; 47 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32; 48 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64; 49 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128; 50 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256; 51 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512; 52 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024; 53 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048; 54 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096; 55 | 56 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16; 57 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32; 58 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64; 59 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128; 60 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256; 61 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512; 62 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024; 63 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048; 64 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/CMSIS/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/amazon-freertos/freertos/portable/ReadMe.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://www.freertos.org/a00111.html 5 | IDList= 6 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/amazon-freertos/freertos/portable/heap_3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel V10.2.0 3 | * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | * this software and associated documentation files (the "Software"), to deal in 7 | * the Software without restriction, including without limitation the rights to 8 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | * the Software, and to permit persons to whom the Software is furnished to do so, 10 | * subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * 22 | * http://www.FreeRTOS.org 23 | * http://aws.amazon.com/freertos 24 | * 25 | * 1 tab == 4 spaces! 26 | */ 27 | 28 | 29 | /* 30 | * Implementation of pvPortMalloc() and vPortFree() that relies on the 31 | * compilers own malloc() and free() implementations. 32 | * 33 | * This file can only be used if the linker is configured to to generate 34 | * a heap memory area. 35 | * 36 | * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the 37 | * memory management pages of http://www.FreeRTOS.org for more information. 38 | */ 39 | 40 | #include 41 | 42 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 43 | all the API functions to use the MPU wrappers. That should only be done when 44 | task.h is included from an application file. */ 45 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 46 | 47 | #include "FreeRTOS.h" 48 | #include "task.h" 49 | 50 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 51 | 52 | #if( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) 53 | #error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0 54 | #endif 55 | 56 | /*-----------------------------------------------------------*/ 57 | 58 | void *pvPortMalloc( size_t xWantedSize ) 59 | { 60 | void *pvReturn; 61 | 62 | vTaskSuspendAll(); 63 | { 64 | pvReturn = malloc( xWantedSize ); 65 | traceMALLOC( pvReturn, xWantedSize ); 66 | } 67 | ( void ) xTaskResumeAll(); 68 | 69 | #if( configUSE_MALLOC_FAILED_HOOK == 1 ) 70 | { 71 | if( pvReturn == NULL ) 72 | { 73 | extern void vApplicationMallocFailedHook( void ); 74 | vApplicationMallocFailedHook(); 75 | } 76 | } 77 | #endif 78 | 79 | return pvReturn; 80 | } 81 | /*-----------------------------------------------------------*/ 82 | 83 | void vPortFree( void *pv ) 84 | { 85 | if( pv ) 86 | { 87 | vTaskSuspendAll(); 88 | { 89 | free( pv ); 90 | traceFREE( pv, 0 ); 91 | } 92 | ( void ) xTaskResumeAll(); 93 | } 94 | } 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/amazon-freertos/include/threading_alt.h: -------------------------------------------------------------------------------- 1 | #ifndef __THREADING_ALT_H__ 2 | #define __THREADING_ALT_H__ 3 | 4 | 5 | #include "FreeRTOS.h" 6 | #include "semphr.h" 7 | 8 | typedef struct 9 | { 10 | SemaphoreHandle_t mutex; 11 | char is_valid; 12 | } mbedtls_threading_mutex_t; 13 | 14 | extern void mbedtls_threading_set_alt( void ( * mutex_init )( mbedtls_threading_mutex_t * ), 15 | void ( * mutex_free )( mbedtls_threading_mutex_t * ), 16 | int ( * mutex_lock )( mbedtls_threading_mutex_t * ), 17 | int ( * mutex_unlock )( mbedtls_threading_mutex_t * ) ); 18 | 19 | 20 | #endif /* ifndef __THREADING_ALT_H__ */ 21 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/amazon-freertos/license/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/board/peripherals.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef _PERIPHERALS_H_ 7 | #define _PERIPHERALS_H_ 8 | 9 | /*********************************************************************************************************************** 10 | * Included files 11 | **********************************************************************************************************************/ 12 | #include "fsl_common.h" 13 | 14 | #if defined(__cplusplus) 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | /*********************************************************************************************************************** 19 | * Initialization functions 20 | **********************************************************************************************************************/ 21 | 22 | void BOARD_InitPeripherals(void); 23 | 24 | /*********************************************************************************************************************** 25 | * BOARD_InitBootPeripherals function 26 | **********************************************************************************************************************/ 27 | void BOARD_InitBootPeripherals(void); 28 | 29 | #if defined(__cplusplus) 30 | } 31 | #endif 32 | 33 | #endif /* _PERIPHERALS_H_ */ 34 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/component/serial_manager/serial_port_uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef __SERIAL_PORT_UART_H__ 10 | #define __SERIAL_PORT_UART_H__ 11 | 12 | /*! 13 | * @addtogroup serial_port_uart 14 | * @{ 15 | */ 16 | 17 | /******************************************************************************* 18 | * Definitions 19 | ******************************************************************************/ 20 | /*! @brief serial port uart handle size*/ 21 | #if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U)) 22 | #define SERIAL_PORT_UART_HANDLE_SIZE (166U) 23 | #else 24 | #define SERIAL_PORT_UART_HANDLE_SIZE (4U) 25 | #endif 26 | 27 | /*! @brief serial port uart parity mode*/ 28 | typedef enum _serial_port_uart_parity_mode 29 | { 30 | kSerialManager_UartParityDisabled = 0x0U, /*!< Parity disabled */ 31 | kSerialManager_UartParityEven = 0x1U, /*!< Parity even enabled */ 32 | kSerialManager_UartParityOdd = 0x2U, /*!< Parity odd enabled */ 33 | } serial_port_uart_parity_mode_t; 34 | 35 | /*! @brief serial port uart stop bit count*/ 36 | typedef enum _serial_port_uart_stop_bit_count 37 | { 38 | kSerialManager_UartOneStopBit = 0U, /*!< One stop bit */ 39 | kSerialManager_UartTwoStopBit = 1U, /*!< Two stop bits */ 40 | } serial_port_uart_stop_bit_count_t; 41 | 42 | /*! @brief serial port uart config struct*/ 43 | typedef struct _serial_port_uart_config 44 | { 45 | uint32_t clockRate; /*!< clock rate */ 46 | uint32_t baudRate; /*!< baud rate */ 47 | serial_port_uart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */ 48 | serial_port_uart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */ 49 | uint8_t instance; /*!< Instance (0 - UART0, 1 - UART1, ...), detail information 50 | please refer to the SOC corresponding RM. */ 51 | uint8_t enableRx; /*!< Enable RX */ 52 | uint8_t enableTx; /*!< Enable TX */ 53 | } serial_port_uart_config_t; 54 | /*! @} */ 55 | #endif /* __SERIAL_PORT_UART_H__ */ 56 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/device/fsl_device_registers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 Freescale Semiconductor, Inc. 3 | * Copyright 2016-2018 NXP 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * 7 | */ 8 | 9 | #ifndef __FSL_DEVICE_REGISTERS_H__ 10 | #define __FSL_DEVICE_REGISTERS_H__ 11 | 12 | /* 13 | * Include the cpu specific register header files. 14 | * 15 | * The CPU macro should be declared in the project or makefile. 16 | */ 17 | #if (defined(CPU_MIMXRT1062CVJ5A) || defined(CPU_MIMXRT1062CVL5A) || defined(CPU_MIMXRT1062DVJ6A) || \ 18 | defined(CPU_MIMXRT1062DVL6A)) 19 | 20 | #define MIMXRT1062_SERIES 21 | 22 | /* CMSIS-style register definitions */ 23 | #include "MIMXRT1062.h" 24 | /* CPU specific feature definitions */ 25 | #include "MIMXRT1062_features.h" 26 | 27 | #else 28 | #error "No valid CPU defined!" 29 | #endif 30 | 31 | #endif /* __FSL_DEVICE_REGISTERS_H__ */ 32 | 33 | /******************************************************************************* 34 | * EOF 35 | ******************************************************************************/ 36 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/doc/amazon-freertos/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the directories found at the root of the Amazon FreeRTOS 2 | distribution. 3 | 4 | lib: 5 | Contains the implementation of AWS and third party libraries. AWS libraries use 6 | abstracted interfaces to enable interchangeability and facilitate porting to new 7 | hardware. 8 | 9 | demos: 10 | Contains a set of pre-configured demo projects for various target platforms. 11 | The projects in the demos directory build the libraries from the lib directory. 12 | 13 | tests: 14 | Various module and integration tests that use the Unity framework. These tests 15 | also support the Amazon FreeRTOS Qualification Program (AFQP). 16 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/doc/amazon-freertos/freertos/portable/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and/or compiler. 4 | 5 | 6 | + The FreeRTOS/Source/Portable/MemMang directory contains the five sample 7 | memory allocators as described on the http://www.FreeRTOS.org WEB site. 8 | 9 | + The other directories each contain files specific to a particular 10 | microcontroller or compiler, where the directory name denotes the compiler 11 | specific files the directory contains. 12 | 13 | 14 | 15 | For example, if you are interested in the [compiler] port for the [architecture] 16 | microcontroller, then the port specific files are contained in 17 | FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the 18 | only port you are interested in then all the other directories can be 19 | ignored. 20 | 21 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/doc/amazon-freertos/license/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the subdirectories found in the /lib directory of the Amazon 2 | FreeRTOS distribution. 3 | 4 | third_party: 5 | Contains the third party libraries, including vendor supplied device specific 6 | driver libraries, required to build target specific demo projects. Organized by 7 | vendor. 8 | 9 | All other directories: 10 | Contain the implementation of a single Amazon FreeRTOS library. -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/drivers/freertos/fsl_lpi2c_freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | #ifndef __FSL_LPI2C_FREERTOS_H__ 9 | #define __FSL_LPI2C_FREERTOS_H__ 10 | 11 | #include "FreeRTOS.h" 12 | #include "portable.h" 13 | #include "semphr.h" 14 | 15 | #include "fsl_lpi2c.h" 16 | 17 | /*! 18 | * @addtogroup lpi2c_freertos_driver LPI2C FreeRTOS driver 19 | * @{ 20 | */ 21 | 22 | /******************************************************************************* 23 | * Definitions 24 | ******************************************************************************/ 25 | 26 | /*! @name Driver version */ 27 | /*@{*/ 28 | /*! @brief LPI2C freertos driver version 2.1.5. */ 29 | #define FSL_LPI2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 1, 5)) 30 | /*@}*/ 31 | 32 | /*! 33 | * @cond RTOS_PRIVATE 34 | * @brief LPI2C FreeRTOS handle 35 | */ 36 | typedef struct _lpi2c_rtos_handle 37 | { 38 | LPI2C_Type *base; /*!< LPI2C base address */ 39 | lpi2c_master_handle_t drv_handle; /*!< Handle of the underlying driver, treated as opaque by the RTOS layer */ 40 | status_t async_status; 41 | SemaphoreHandle_t mutex; /*!< Mutex to lock the handle during a trasfer */ 42 | SemaphoreHandle_t semaphore; /*!< Semaphore to notify and unblock task when transfer ends */ 43 | } lpi2c_rtos_handle_t; 44 | /*! \endcond */ 45 | 46 | /******************************************************************************* 47 | * API 48 | ******************************************************************************/ 49 | 50 | #if defined(__cplusplus) 51 | extern "C" { 52 | #endif 53 | 54 | /*! 55 | * @name LPI2C RTOS Operation 56 | * @{ 57 | */ 58 | 59 | /*! 60 | * @brief Initializes LPI2C. 61 | * 62 | * This function initializes the LPI2C module and related RTOS context. 63 | * 64 | * @param handle The RTOS LPI2C handle, the pointer to an allocated space for RTOS context. 65 | * @param base The pointer base address of the LPI2C instance to initialize. 66 | * @param masterConfig Configuration structure to set-up LPI2C in master mode. 67 | * @param srcClock_Hz Frequency of input clock of the LPI2C module. 68 | * @return status of the operation. 69 | */ 70 | status_t LPI2C_RTOS_Init(lpi2c_rtos_handle_t *handle, 71 | LPI2C_Type *base, 72 | const lpi2c_master_config_t *masterConfig, 73 | uint32_t srcClock_Hz); 74 | 75 | /*! 76 | * @brief Deinitializes the LPI2C. 77 | * 78 | * This function deinitializes the LPI2C module and related RTOS context. 79 | * 80 | * @param handle The RTOS LPI2C handle. 81 | */ 82 | status_t LPI2C_RTOS_Deinit(lpi2c_rtos_handle_t *handle); 83 | 84 | /*! 85 | * @brief Performs I2C transfer. 86 | * 87 | * This function performs an I2C transfer using LPI2C module according to data given in the transfer structure. 88 | * 89 | * @param handle The RTOS LPI2C handle. 90 | * @param transfer Structure specifying the transfer parameters. 91 | * @return status of the operation. 92 | */ 93 | status_t LPI2C_RTOS_Transfer(lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer); 94 | 95 | /*! 96 | * @} 97 | */ 98 | 99 | #if defined(__cplusplus) 100 | } 101 | #endif 102 | 103 | /*! 104 | * @} 105 | */ 106 | 107 | #endif /* __FSL_LPI2C_FREERTOS_H__ */ 108 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/libs/libarm_cortexM7lfsp_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/slmx4_projects/button_demo2/libs/libarm_cortexM7lfsp_math.a -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/readme.md: -------------------------------------------------------------------------------- 1 | # Button Demo 2 2 | 3 | This program is demonstrates a timed button press 4 | 5 | Hardware required: 6 | - SLMX4-HW 7 | - epam-x4 (or other pin-compatible x4 module) 8 | 9 | This program demonstrates another way to GPIO interrupts. In situations where 10 | a number of actions may be executed based on how long a button has been pressed, 11 | the typical *Timer* is not adequate. This example uses the `xTaskGetTickCount()` 12 | function to measure elapsed time around a button press, then takes an appropriate 13 | action. 14 | 15 | When the program runs, the RGB LED will be one of three colors: 16 | - Red (user button 2 pressed < 2 s) 17 | - Green (user button 2 pressed > 2 s and < 4 s) 18 | - Blue (user button 2 pressed > 4 s) 19 | 20 | User button 2 is also used as a separate task. This shows how the single ISR 21 | can serve multiple FreeRTOS tasks in an independent fashion. 22 | 23 | User button 1 is used to toggle a "throb" which manipulates the brightness 24 | of the RGB LED color. User button 1 presses < 2 s are ignored, and > 2 s will 25 | toggle the throbbing feature. -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/utilities/fsl_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | * 8 | */ 9 | 10 | #ifndef _FSL_STR_H 11 | #define _FSL_STR_H 12 | 13 | #include "fsl_common.h" 14 | 15 | /*! 16 | * @addtogroup debugconsole 17 | * @{ 18 | */ 19 | 20 | /******************************************************************************* 21 | * Prototypes 22 | ******************************************************************************/ 23 | #if defined(__cplusplus) 24 | extern "C" { 25 | #endif /* __cplusplus */ 26 | 27 | /*! 28 | * @brief A function pointer which is used when format printf log. 29 | */ 30 | typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len); 31 | 32 | /*! 33 | * @brief This function outputs its parameters according to a formatted string. 34 | * 35 | * @note I/O is performed by calling given function pointer using following 36 | * (*func_ptr)(c); 37 | * 38 | * @param[in] fmt Format string for printf. 39 | * @param[in] ap Arguments to printf. 40 | * @param[in] buf pointer to the buffer 41 | * @param cb print callbck function pointer 42 | * 43 | * @return Number of characters to be print 44 | */ 45 | int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb); 46 | 47 | /*! 48 | * @brief Converts an input line of ASCII characters based upon a provided 49 | * string format. 50 | * 51 | * @param[in] line_ptr The input line of ASCII data. 52 | * @param[in] format Format first points to the format string. 53 | * @param[in] args_ptr The list of parameters. 54 | * 55 | * @return Number of input items converted and assigned. 56 | * @retval IO_EOF When line_ptr is empty string "". 57 | */ 58 | int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr); 59 | 60 | #if defined(__cplusplus) 61 | } 62 | #endif /* __cplusplus */ 63 | 64 | /*! @} */ 65 | 66 | #endif /* _FSL_STR_H */ 67 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/xethru_xep/x4driver.md: -------------------------------------------------------------------------------- 1 | # X4 Driver 2 | 3 | This version of the x4driver is `3.4.7`. 4 | 5 | ## Legacy Conversion: 6 | | xep | fex4 | notes | 7 | | :-- | :--- | :---- | 8 | 9 | 10 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/xethru_xep/xtcompiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * 5 | */ 6 | 7 | #ifndef XTCOMPILER_H 8 | #define XTCOMPILER_H 9 | 10 | #ifdef UNUSED 11 | #elif defined(__GNUC__) 12 | // # define UNUSED(x) UNUSED_ ## x __attribute__ ((unused)) 13 | # define UNUSED(x) (void)(x) 14 | #elif defined(__LCLINT__) 15 | # define UNUSED(x) /*@unused@*/ x 16 | #elif defined(__cplusplus) 17 | # define UNUSED(x) 18 | #else 19 | # define UNUSED(x) x 20 | #endif 21 | 22 | 23 | 24 | #endif // XTCOMPILER_H -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/xip/fsl_flexspi_nor_boot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "fsl_flexspi_nor_boot.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_device" 13 | #endif 14 | 15 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 16 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 17 | __attribute__((section(".boot_hdr.ivt"))) 18 | #elif defined(__ICCARM__) 19 | #pragma location=".boot_hdr.ivt" 20 | #endif 21 | /************************************* 22 | * IVT Data 23 | *************************************/ 24 | const ivt image_vector_table = { 25 | IVT_HEADER, /* IVT Header */ 26 | IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ 27 | IVT_RSVD, /* Reserved = 0 */ 28 | (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ 29 | (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ 30 | (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ 31 | (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ 32 | IVT_RSVD /* Reserved = 0 */ 33 | }; 34 | 35 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 36 | __attribute__((section(".boot_hdr.boot_data"))) 37 | #elif defined(__ICCARM__) 38 | #pragma location=".boot_hdr.boot_data" 39 | #endif 40 | /************************************* 41 | * Boot Data 42 | *************************************/ 43 | const BOOT_DATA_T boot_data = { 44 | FLASH_BASE, /* boot start location */ 45 | FLASH_SIZE, /* size */ 46 | PLUGIN_FLAG, /* Plugin flag*/ 47 | 0xFFFFFFFF /* empty - extra data word */ 48 | }; 49 | #endif 50 | 51 | 52 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/xip/slmx4_flexspi_nor_config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "slmx4_flexspi_nor_config.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_board" 13 | #endif 14 | 15 | /******************************************************************************* 16 | * Code 17 | ******************************************************************************/ 18 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 19 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 20 | __attribute__((section(".boot_hdr.conf"))) 21 | #elif defined(__ICCARM__) 22 | #pragma location = ".boot_hdr.conf" 23 | #endif 24 | 25 | const flexspi_nor_config_t qspiflash_config = { 26 | .memConfig = 27 | { 28 | .tag = FLEXSPI_CFG_BLK_TAG, 29 | .version = FLEXSPI_CFG_BLK_VERSION, 30 | .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad, 31 | .csHoldTime = 3u, 32 | .csSetupTime = 3u, 33 | // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock 34 | .sflashPadType = kSerialFlash_4Pads, 35 | .serialClkFreq = kFlexSpiSerialClk_100MHz, 36 | .sflashA1Size = 4u * 1024u * 1024u, 37 | .lookupTable = 38 | { 39 | // Read LUTs 40 | FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18), 41 | FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04), 42 | }, 43 | }, 44 | .pageSize = 256u, 45 | .sectorSize = 4u * 1024u, 46 | .blockSize = 64u * 1024u, 47 | .isUniformBlockSize = false, 48 | }; 49 | #endif /* XIP_BOOT_HEADER_ENABLE */ 50 | -------------------------------------------------------------------------------- /slmx4_projects/button_demo2/xip/slmx4_sdram_ini_dcd.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef __SLMX4_SDRAM_INI_DCD__ 7 | #define __SLMX4_SDRAM_INI_DCD__ 8 | 9 | #include 10 | 11 | /*! @name Driver version */ 12 | /*@{*/ 13 | /*! @brief XIP_BOARD driver version 2.0.0. */ 14 | #define FSL_XIP_BOARD_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 15 | /*@}*/ 16 | 17 | /************************************* 18 | * DCD Data 19 | *************************************/ 20 | #define DCD_TAG_HEADER (0xD2) 21 | #define DCD_VERSION (0x41) 22 | #define DCD_TAG_HEADER_SHIFT (24) 23 | #define DCD_ARRAY_SIZE 1 24 | 25 | #endif /* __SLMX4_SDRAM_INI_DCD__ */ 26 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/.gitignore: -------------------------------------------------------------------------------- 1 | /Debug/ 2 | /.settings/ 3 | *.launch -------------------------------------------------------------------------------- /slmx4_projects/led_blink/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | led_blink 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | com.nxp.mcuxpresso.core.datamodels.sdkNature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/CMSIS/arm_const_structs.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Project: CMSIS DSP Library 3 | * Title: arm_const_structs.h 4 | * Description: Constant structs that are initialized for user convenience. 5 | * For example, some can be given as arguments to the arm_cfft_f32() function. 6 | * 7 | * $Date: 27. January 2017 8 | * $Revision: V.1.5.1 9 | * 10 | * Target Processor: Cortex-M cores 11 | * -------------------------------------------------------------------- */ 12 | /* 13 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved. 14 | * 15 | * SPDX-License-Identifier: Apache-2.0 16 | * 17 | * Licensed under the Apache License, Version 2.0 (the License); you may 18 | * not use this file except in compliance with the License. 19 | * You may obtain a copy of the License at 20 | * 21 | * www.apache.org/licenses/LICENSE-2.0 22 | * 23 | * Unless required by applicable law or agreed to in writing, software 24 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26 | * See the License for the specific language governing permissions and 27 | * limitations under the License. 28 | */ 29 | 30 | #ifndef _ARM_CONST_STRUCTS_H 31 | #define _ARM_CONST_STRUCTS_H 32 | 33 | #include "arm_math.h" 34 | #include "arm_common_tables.h" 35 | 36 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16; 37 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32; 38 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64; 39 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128; 40 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256; 41 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512; 42 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024; 43 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048; 44 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096; 45 | 46 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16; 47 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32; 48 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64; 49 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128; 50 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256; 51 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512; 52 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024; 53 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048; 54 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096; 55 | 56 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16; 57 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32; 58 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64; 59 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128; 60 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256; 61 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512; 62 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024; 63 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048; 64 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/CMSIS/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/amazon-freertos/freertos/portable/ReadMe.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://www.freertos.org/a00111.html 5 | IDList= 6 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/amazon-freertos/freertos/portable/heap_3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel V10.2.0 3 | * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | * this software and associated documentation files (the "Software"), to deal in 7 | * the Software without restriction, including without limitation the rights to 8 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | * the Software, and to permit persons to whom the Software is furnished to do so, 10 | * subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * 22 | * http://www.FreeRTOS.org 23 | * http://aws.amazon.com/freertos 24 | * 25 | * 1 tab == 4 spaces! 26 | */ 27 | 28 | 29 | /* 30 | * Implementation of pvPortMalloc() and vPortFree() that relies on the 31 | * compilers own malloc() and free() implementations. 32 | * 33 | * This file can only be used if the linker is configured to to generate 34 | * a heap memory area. 35 | * 36 | * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the 37 | * memory management pages of http://www.FreeRTOS.org for more information. 38 | */ 39 | 40 | #include 41 | 42 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 43 | all the API functions to use the MPU wrappers. That should only be done when 44 | task.h is included from an application file. */ 45 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 46 | 47 | #include "FreeRTOS.h" 48 | #include "task.h" 49 | 50 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 51 | 52 | #if( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) 53 | #error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0 54 | #endif 55 | 56 | /*-----------------------------------------------------------*/ 57 | 58 | void *pvPortMalloc( size_t xWantedSize ) 59 | { 60 | void *pvReturn; 61 | 62 | vTaskSuspendAll(); 63 | { 64 | pvReturn = malloc( xWantedSize ); 65 | traceMALLOC( pvReturn, xWantedSize ); 66 | } 67 | ( void ) xTaskResumeAll(); 68 | 69 | #if( configUSE_MALLOC_FAILED_HOOK == 1 ) 70 | { 71 | if( pvReturn == NULL ) 72 | { 73 | extern void vApplicationMallocFailedHook( void ); 74 | vApplicationMallocFailedHook(); 75 | } 76 | } 77 | #endif 78 | 79 | return pvReturn; 80 | } 81 | /*-----------------------------------------------------------*/ 82 | 83 | void vPortFree( void *pv ) 84 | { 85 | if( pv ) 86 | { 87 | vTaskSuspendAll(); 88 | { 89 | free( pv ); 90 | traceFREE( pv, 0 ); 91 | } 92 | ( void ) xTaskResumeAll(); 93 | } 94 | } 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/amazon-freertos/include/threading_alt.h: -------------------------------------------------------------------------------- 1 | #ifndef __THREADING_ALT_H__ 2 | #define __THREADING_ALT_H__ 3 | 4 | 5 | #include "FreeRTOS.h" 6 | #include "semphr.h" 7 | 8 | typedef struct 9 | { 10 | SemaphoreHandle_t mutex; 11 | char is_valid; 12 | } mbedtls_threading_mutex_t; 13 | 14 | extern void mbedtls_threading_set_alt( void ( * mutex_init )( mbedtls_threading_mutex_t * ), 15 | void ( * mutex_free )( mbedtls_threading_mutex_t * ), 16 | int ( * mutex_lock )( mbedtls_threading_mutex_t * ), 17 | int ( * mutex_unlock )( mbedtls_threading_mutex_t * ) ); 18 | 19 | 20 | #endif /* ifndef __THREADING_ALT_H__ */ 21 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/amazon-freertos/license/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/board/peripherals.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef _PERIPHERALS_H_ 7 | #define _PERIPHERALS_H_ 8 | 9 | /*********************************************************************************************************************** 10 | * Included files 11 | **********************************************************************************************************************/ 12 | #include "fsl_common.h" 13 | 14 | #if defined(__cplusplus) 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | /*********************************************************************************************************************** 19 | * Initialization functions 20 | **********************************************************************************************************************/ 21 | 22 | void BOARD_InitPeripherals(void); 23 | 24 | /*********************************************************************************************************************** 25 | * BOARD_InitBootPeripherals function 26 | **********************************************************************************************************************/ 27 | void BOARD_InitBootPeripherals(void); 28 | 29 | #if defined(__cplusplus) 30 | } 31 | #endif 32 | 33 | #endif /* _PERIPHERALS_H_ */ 34 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/component/serial_manager/serial_port_uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef __SERIAL_PORT_UART_H__ 10 | #define __SERIAL_PORT_UART_H__ 11 | 12 | /*! 13 | * @addtogroup serial_port_uart 14 | * @{ 15 | */ 16 | 17 | /******************************************************************************* 18 | * Definitions 19 | ******************************************************************************/ 20 | /*! @brief serial port uart handle size*/ 21 | #if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U)) 22 | #define SERIAL_PORT_UART_HANDLE_SIZE (166U) 23 | #else 24 | #define SERIAL_PORT_UART_HANDLE_SIZE (4U) 25 | #endif 26 | 27 | /*! @brief serial port uart parity mode*/ 28 | typedef enum _serial_port_uart_parity_mode 29 | { 30 | kSerialManager_UartParityDisabled = 0x0U, /*!< Parity disabled */ 31 | kSerialManager_UartParityEven = 0x1U, /*!< Parity even enabled */ 32 | kSerialManager_UartParityOdd = 0x2U, /*!< Parity odd enabled */ 33 | } serial_port_uart_parity_mode_t; 34 | 35 | /*! @brief serial port uart stop bit count*/ 36 | typedef enum _serial_port_uart_stop_bit_count 37 | { 38 | kSerialManager_UartOneStopBit = 0U, /*!< One stop bit */ 39 | kSerialManager_UartTwoStopBit = 1U, /*!< Two stop bits */ 40 | } serial_port_uart_stop_bit_count_t; 41 | 42 | /*! @brief serial port uart config struct*/ 43 | typedef struct _serial_port_uart_config 44 | { 45 | uint32_t clockRate; /*!< clock rate */ 46 | uint32_t baudRate; /*!< baud rate */ 47 | serial_port_uart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */ 48 | serial_port_uart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */ 49 | uint8_t instance; /*!< Instance (0 - UART0, 1 - UART1, ...), detail information 50 | please refer to the SOC corresponding RM. */ 51 | uint8_t enableRx; /*!< Enable RX */ 52 | uint8_t enableTx; /*!< Enable TX */ 53 | } serial_port_uart_config_t; 54 | /*! @} */ 55 | #endif /* __SERIAL_PORT_UART_H__ */ 56 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/device/fsl_device_registers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 Freescale Semiconductor, Inc. 3 | * Copyright 2016-2018 NXP 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * 7 | */ 8 | 9 | #ifndef __FSL_DEVICE_REGISTERS_H__ 10 | #define __FSL_DEVICE_REGISTERS_H__ 11 | 12 | /* 13 | * Include the cpu specific register header files. 14 | * 15 | * The CPU macro should be declared in the project or makefile. 16 | */ 17 | #if (defined(CPU_MIMXRT1062CVJ5A) || defined(CPU_MIMXRT1062CVL5A) || defined(CPU_MIMXRT1062DVJ6A) || \ 18 | defined(CPU_MIMXRT1062DVL6A)) 19 | 20 | #define MIMXRT1062_SERIES 21 | 22 | /* CMSIS-style register definitions */ 23 | #include "MIMXRT1062.h" 24 | /* CPU specific feature definitions */ 25 | #include "MIMXRT1062_features.h" 26 | 27 | #else 28 | #error "No valid CPU defined!" 29 | #endif 30 | 31 | #endif /* __FSL_DEVICE_REGISTERS_H__ */ 32 | 33 | /******************************************************************************* 34 | * EOF 35 | ******************************************************************************/ 36 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/doc/amazon-freertos/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the directories found at the root of the Amazon FreeRTOS 2 | distribution. 3 | 4 | lib: 5 | Contains the implementation of AWS and third party libraries. AWS libraries use 6 | abstracted interfaces to enable interchangeability and facilitate porting to new 7 | hardware. 8 | 9 | demos: 10 | Contains a set of pre-configured demo projects for various target platforms. 11 | The projects in the demos directory build the libraries from the lib directory. 12 | 13 | tests: 14 | Various module and integration tests that use the Unity framework. These tests 15 | also support the Amazon FreeRTOS Qualification Program (AFQP). 16 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/doc/amazon-freertos/freertos/portable/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and/or compiler. 4 | 5 | 6 | + The FreeRTOS/Source/Portable/MemMang directory contains the five sample 7 | memory allocators as described on the http://www.FreeRTOS.org WEB site. 8 | 9 | + The other directories each contain files specific to a particular 10 | microcontroller or compiler, where the directory name denotes the compiler 11 | specific files the directory contains. 12 | 13 | 14 | 15 | For example, if you are interested in the [compiler] port for the [architecture] 16 | microcontroller, then the port specific files are contained in 17 | FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the 18 | only port you are interested in then all the other directories can be 19 | ignored. 20 | 21 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/doc/amazon-freertos/license/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the subdirectories found in the /lib directory of the Amazon 2 | FreeRTOS distribution. 3 | 4 | third_party: 5 | Contains the third party libraries, including vendor supplied device specific 6 | driver libraries, required to build target specific demo projects. Organized by 7 | vendor. 8 | 9 | All other directories: 10 | Contain the implementation of a single Amazon FreeRTOS library. -------------------------------------------------------------------------------- /slmx4_projects/led_blink/drivers/freertos/fsl_lpi2c_freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | #ifndef __FSL_LPI2C_FREERTOS_H__ 9 | #define __FSL_LPI2C_FREERTOS_H__ 10 | 11 | #include "FreeRTOS.h" 12 | #include "portable.h" 13 | #include "semphr.h" 14 | 15 | #include "fsl_lpi2c.h" 16 | 17 | /*! 18 | * @addtogroup lpi2c_freertos_driver LPI2C FreeRTOS driver 19 | * @{ 20 | */ 21 | 22 | /******************************************************************************* 23 | * Definitions 24 | ******************************************************************************/ 25 | 26 | /*! @name Driver version */ 27 | /*@{*/ 28 | /*! @brief LPI2C freertos driver version 2.1.5. */ 29 | #define FSL_LPI2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 1, 5)) 30 | /*@}*/ 31 | 32 | /*! 33 | * @cond RTOS_PRIVATE 34 | * @brief LPI2C FreeRTOS handle 35 | */ 36 | typedef struct _lpi2c_rtos_handle 37 | { 38 | LPI2C_Type *base; /*!< LPI2C base address */ 39 | lpi2c_master_handle_t drv_handle; /*!< Handle of the underlying driver, treated as opaque by the RTOS layer */ 40 | status_t async_status; 41 | SemaphoreHandle_t mutex; /*!< Mutex to lock the handle during a trasfer */ 42 | SemaphoreHandle_t semaphore; /*!< Semaphore to notify and unblock task when transfer ends */ 43 | } lpi2c_rtos_handle_t; 44 | /*! \endcond */ 45 | 46 | /******************************************************************************* 47 | * API 48 | ******************************************************************************/ 49 | 50 | #if defined(__cplusplus) 51 | extern "C" { 52 | #endif 53 | 54 | /*! 55 | * @name LPI2C RTOS Operation 56 | * @{ 57 | */ 58 | 59 | /*! 60 | * @brief Initializes LPI2C. 61 | * 62 | * This function initializes the LPI2C module and related RTOS context. 63 | * 64 | * @param handle The RTOS LPI2C handle, the pointer to an allocated space for RTOS context. 65 | * @param base The pointer base address of the LPI2C instance to initialize. 66 | * @param masterConfig Configuration structure to set-up LPI2C in master mode. 67 | * @param srcClock_Hz Frequency of input clock of the LPI2C module. 68 | * @return status of the operation. 69 | */ 70 | status_t LPI2C_RTOS_Init(lpi2c_rtos_handle_t *handle, 71 | LPI2C_Type *base, 72 | const lpi2c_master_config_t *masterConfig, 73 | uint32_t srcClock_Hz); 74 | 75 | /*! 76 | * @brief Deinitializes the LPI2C. 77 | * 78 | * This function deinitializes the LPI2C module and related RTOS context. 79 | * 80 | * @param handle The RTOS LPI2C handle. 81 | */ 82 | status_t LPI2C_RTOS_Deinit(lpi2c_rtos_handle_t *handle); 83 | 84 | /*! 85 | * @brief Performs I2C transfer. 86 | * 87 | * This function performs an I2C transfer using LPI2C module according to data given in the transfer structure. 88 | * 89 | * @param handle The RTOS LPI2C handle. 90 | * @param transfer Structure specifying the transfer parameters. 91 | * @return status of the operation. 92 | */ 93 | status_t LPI2C_RTOS_Transfer(lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer); 94 | 95 | /*! 96 | * @} 97 | */ 98 | 99 | #if defined(__cplusplus) 100 | } 101 | #endif 102 | 103 | /*! 104 | * @} 105 | */ 106 | 107 | #endif /* __FSL_LPI2C_FREERTOS_H__ */ 108 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/drivers/freertos/fsl_lpspi_freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | #ifndef __FSL_LPSPI_FREERTOS_H__ 9 | #define __FSL_LPSPI_FREERTOS_H__ 10 | 11 | #include "FreeRTOS.h" 12 | #include "portable.h" 13 | #include "semphr.h" 14 | 15 | #include "fsl_lpspi.h" 16 | 17 | /*! 18 | * @addtogroup lpspi_freertos_driver LPSPI FreeRTOS driver 19 | * @{ 20 | */ 21 | 22 | /********************************************************************************************************************** 23 | * Definitions 24 | *********************************************************************************************************************/ 25 | 26 | /*! @name Driver version */ 27 | /*@{*/ 28 | /*! @brief LPSPI freertos driver version 2.0.2. */ 29 | #define FSL_LPSPI_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) 30 | /*@}*/ 31 | 32 | /*! 33 | * @cond RTOS_PRIVATE 34 | * @brief LPSPI FreeRTOS handle 35 | */ 36 | typedef struct _lpspi_rtos_handle 37 | { 38 | LPSPI_Type *base; /*!< LPSPI base address */ 39 | lpspi_master_handle_t drv_handle; /*!< Handle of the underlying driver, treated as opaque by the RTOS layer */ 40 | status_t async_status; 41 | SemaphoreHandle_t mutex; /*!< Mutex to lock the handle during a trasfer */ 42 | SemaphoreHandle_t event; /*!< Semaphore to notify and unblock task when transfer ends */ 43 | } lpspi_rtos_handle_t; 44 | /*! \endcond */ 45 | 46 | /********************************************************************************************************************** 47 | * API 48 | *********************************************************************************************************************/ 49 | 50 | #if defined(__cplusplus) 51 | extern "C" { 52 | #endif 53 | 54 | /*! 55 | * @name LPSPI RTOS Operation 56 | * @{ 57 | */ 58 | 59 | /*! 60 | * @brief Initializes LPSPI. 61 | * 62 | * This function initializes the LPSPI module and related RTOS context. 63 | * 64 | * @param handle The RTOS LPSPI handle, the pointer to an allocated space for RTOS context. 65 | * @param base The pointer base address of the LPSPI instance to initialize. 66 | * @param masterConfig Configuration structure to set-up LPSPI in master mode. 67 | * @param srcClock_Hz Frequency of input clock of the LPSPI module. 68 | * @return status of the operation. 69 | */ 70 | status_t LPSPI_RTOS_Init(lpspi_rtos_handle_t *handle, 71 | LPSPI_Type *base, 72 | const lpspi_master_config_t *masterConfig, 73 | uint32_t srcClock_Hz); 74 | 75 | /*! 76 | * @brief Deinitializes the LPSPI. 77 | * 78 | * This function deinitializes the LPSPI module and related RTOS context. 79 | * 80 | * @param handle The RTOS LPSPI handle. 81 | */ 82 | status_t LPSPI_RTOS_Deinit(lpspi_rtos_handle_t *handle); 83 | 84 | /*! 85 | * @brief Performs SPI transfer. 86 | * 87 | * This function performs an SPI transfer according to data given in the transfer structure. 88 | * 89 | * @param handle The RTOS LPSPI handle. 90 | * @param transfer Structure specifying the transfer parameters. 91 | * @return status of the operation. 92 | */ 93 | status_t LPSPI_RTOS_Transfer(lpspi_rtos_handle_t *handle, lpspi_transfer_t *transfer); 94 | 95 | /*! 96 | * @} 97 | */ 98 | 99 | #if defined(__cplusplus) 100 | } 101 | #endif 102 | 103 | /*! 104 | * @} 105 | */ 106 | 107 | #endif /* __FSL_LPSPI_FREERTOS_H__ */ 108 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/libs/libarm_cortexM7lfsp_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/slmx4_projects/led_blink/libs/libarm_cortexM7lfsp_math.a -------------------------------------------------------------------------------- /slmx4_projects/led_blink/readme.md: -------------------------------------------------------------------------------- 1 | # LED Blink Demo 2 | 3 | This program is simple demonstration of the LEDs 4 | 5 | Hardware required: 6 | - SLMX4-HW 7 | - epam-x4 (or other pin-compatible x4 module) 8 | 9 | This program uses the Red, Green, and RGB LED in a few modes. Under the "Modes" 10 | section below, uncomment one mode and comment out all the others. _Some modes 11 | can be mixed though._ 12 | 13 | Modes: 14 | * BLINK_RED_LED 15 | This mode blinks the Red LED at a fixed rate 16 | * BLINK_GREEN_LED 17 | This mode blinks the Green LED at a fixed rate 18 | * BLINK_RGB_LED 19 | This blinks the RGB LED at a fixed rate. This essentially is setting the RGB 20 | LED to either the current color or "off" 21 | * COLOR_CYCLE_RGB_LED 22 | This mode cycles the RGB LED through the HSV color space by manipulating the 23 | _hue_ value 24 | * THROB_RGB_LED 25 | This mode color cycles the RGB LED by manipulating the _hue_ as in the color 26 | cycle mode. However, this mode also manipulates the _value_ in the HSV color 27 | space, which changes the brightness 28 | * NIGHT_THROB_LED 29 | This mode throbs the brightness for night time use in a heartbeat pattern 30 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/utilities/fsl_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | * 8 | */ 9 | 10 | #ifndef _FSL_STR_H 11 | #define _FSL_STR_H 12 | 13 | #include "fsl_common.h" 14 | 15 | /*! 16 | * @addtogroup debugconsole 17 | * @{ 18 | */ 19 | 20 | /******************************************************************************* 21 | * Prototypes 22 | ******************************************************************************/ 23 | #if defined(__cplusplus) 24 | extern "C" { 25 | #endif /* __cplusplus */ 26 | 27 | /*! 28 | * @brief A function pointer which is used when format printf log. 29 | */ 30 | typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len); 31 | 32 | /*! 33 | * @brief This function outputs its parameters according to a formatted string. 34 | * 35 | * @note I/O is performed by calling given function pointer using following 36 | * (*func_ptr)(c); 37 | * 38 | * @param[in] fmt Format string for printf. 39 | * @param[in] ap Arguments to printf. 40 | * @param[in] buf pointer to the buffer 41 | * @param cb print callbck function pointer 42 | * 43 | * @return Number of characters to be print 44 | */ 45 | int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb); 46 | 47 | /*! 48 | * @brief Converts an input line of ASCII characters based upon a provided 49 | * string format. 50 | * 51 | * @param[in] line_ptr The input line of ASCII data. 52 | * @param[in] format Format first points to the format string. 53 | * @param[in] args_ptr The list of parameters. 54 | * 55 | * @return Number of input items converted and assigned. 56 | * @retval IO_EOF When line_ptr is empty string "". 57 | */ 58 | int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr); 59 | 60 | #if defined(__cplusplus) 61 | } 62 | #endif /* __cplusplus */ 63 | 64 | /*! @} */ 65 | 66 | #endif /* _FSL_STR_H */ 67 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/xethru_xep/x4driver.md: -------------------------------------------------------------------------------- 1 | # X4 Driver 2 | 3 | This version of the x4driver is `3.4.7`. 4 | 5 | ## Legacy Conversion: 6 | | xep | fex4 | notes | 7 | | :-- | :--- | :---- | 8 | 9 | 10 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/xethru_xep/xtcompiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * 5 | */ 6 | 7 | #ifndef XTCOMPILER_H 8 | #define XTCOMPILER_H 9 | 10 | #ifdef UNUSED 11 | #elif defined(__GNUC__) 12 | // # define UNUSED(x) UNUSED_ ## x __attribute__ ((unused)) 13 | # define UNUSED(x) (void)(x) 14 | #elif defined(__LCLINT__) 15 | # define UNUSED(x) /*@unused@*/ x 16 | #elif defined(__cplusplus) 17 | # define UNUSED(x) 18 | #else 19 | # define UNUSED(x) x 20 | #endif 21 | 22 | 23 | 24 | #endif // XTCOMPILER_H -------------------------------------------------------------------------------- /slmx4_projects/led_blink/xip/fsl_flexspi_nor_boot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "fsl_flexspi_nor_boot.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_device" 13 | #endif 14 | 15 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 16 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 17 | __attribute__((section(".boot_hdr.ivt"))) 18 | #elif defined(__ICCARM__) 19 | #pragma location=".boot_hdr.ivt" 20 | #endif 21 | /************************************* 22 | * IVT Data 23 | *************************************/ 24 | const ivt image_vector_table = { 25 | IVT_HEADER, /* IVT Header */ 26 | IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ 27 | IVT_RSVD, /* Reserved = 0 */ 28 | (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ 29 | (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ 30 | (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ 31 | (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ 32 | IVT_RSVD /* Reserved = 0 */ 33 | }; 34 | 35 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 36 | __attribute__((section(".boot_hdr.boot_data"))) 37 | #elif defined(__ICCARM__) 38 | #pragma location=".boot_hdr.boot_data" 39 | #endif 40 | /************************************* 41 | * Boot Data 42 | *************************************/ 43 | const BOOT_DATA_T boot_data = { 44 | FLASH_BASE, /* boot start location */ 45 | FLASH_SIZE, /* size */ 46 | PLUGIN_FLAG, /* Plugin flag*/ 47 | 0xFFFFFFFF /* empty - extra data word */ 48 | }; 49 | #endif 50 | 51 | 52 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/xip/slmx4_flexspi_nor_config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "slmx4_flexspi_nor_config.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_board" 13 | #endif 14 | 15 | /******************************************************************************* 16 | * Code 17 | ******************************************************************************/ 18 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 19 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 20 | __attribute__((section(".boot_hdr.conf"))) 21 | #elif defined(__ICCARM__) 22 | #pragma location = ".boot_hdr.conf" 23 | #endif 24 | 25 | const flexspi_nor_config_t qspiflash_config = { 26 | .memConfig = 27 | { 28 | .tag = FLEXSPI_CFG_BLK_TAG, 29 | .version = FLEXSPI_CFG_BLK_VERSION, 30 | .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad, 31 | .csHoldTime = 3u, 32 | .csSetupTime = 3u, 33 | // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock 34 | .sflashPadType = kSerialFlash_4Pads, 35 | .serialClkFreq = kFlexSpiSerialClk_100MHz, 36 | .sflashA1Size = 4u * 1024u * 1024u, 37 | .lookupTable = 38 | { 39 | // Read LUTs 40 | FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18), 41 | FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04), 42 | }, 43 | }, 44 | .pageSize = 256u, 45 | .sectorSize = 4u * 1024u, 46 | .blockSize = 64u * 1024u, 47 | .isUniformBlockSize = false, 48 | }; 49 | #endif /* XIP_BOOT_HEADER_ENABLE */ 50 | -------------------------------------------------------------------------------- /slmx4_projects/led_blink/xip/slmx4_sdram_ini_dcd.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef __SLMX4_SDRAM_INI_DCD__ 7 | #define __SLMX4_SDRAM_INI_DCD__ 8 | 9 | #include 10 | 11 | /*! @name Driver version */ 12 | /*@{*/ 13 | /*! @brief XIP_BOARD driver version 2.0.0. */ 14 | #define FSL_XIP_BOARD_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 15 | /*@}*/ 16 | 17 | /************************************* 18 | * DCD Data 19 | *************************************/ 20 | #define DCD_TAG_HEADER (0xD2) 21 | #define DCD_VERSION (0x41) 22 | #define DCD_TAG_HEADER_SHIFT (24) 23 | #define DCD_ARRAY_SIZE 1 24 | 25 | #endif /* __SLMX4_SDRAM_INI_DCD__ */ 26 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/.gitignore: -------------------------------------------------------------------------------- 1 | /Debug/ 2 | /.settings/ 3 | *.launch -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | lux_demo 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | com.nxp.mcuxpresso.core.datamodels.sdkNature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/CMSIS/arm_const_structs.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Project: CMSIS DSP Library 3 | * Title: arm_const_structs.h 4 | * Description: Constant structs that are initialized for user convenience. 5 | * For example, some can be given as arguments to the arm_cfft_f32() function. 6 | * 7 | * $Date: 27. January 2017 8 | * $Revision: V.1.5.1 9 | * 10 | * Target Processor: Cortex-M cores 11 | * -------------------------------------------------------------------- */ 12 | /* 13 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved. 14 | * 15 | * SPDX-License-Identifier: Apache-2.0 16 | * 17 | * Licensed under the Apache License, Version 2.0 (the License); you may 18 | * not use this file except in compliance with the License. 19 | * You may obtain a copy of the License at 20 | * 21 | * www.apache.org/licenses/LICENSE-2.0 22 | * 23 | * Unless required by applicable law or agreed to in writing, software 24 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26 | * See the License for the specific language governing permissions and 27 | * limitations under the License. 28 | */ 29 | 30 | #ifndef _ARM_CONST_STRUCTS_H 31 | #define _ARM_CONST_STRUCTS_H 32 | 33 | #include "arm_math.h" 34 | #include "arm_common_tables.h" 35 | 36 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16; 37 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32; 38 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64; 39 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128; 40 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256; 41 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512; 42 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024; 43 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048; 44 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096; 45 | 46 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16; 47 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32; 48 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64; 49 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128; 50 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256; 51 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512; 52 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024; 53 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048; 54 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096; 55 | 56 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16; 57 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32; 58 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64; 59 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128; 60 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256; 61 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512; 62 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024; 63 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048; 64 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/CMSIS/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/amazon-freertos/freertos/portable/ReadMe.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://www.freertos.org/a00111.html 5 | IDList= 6 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/amazon-freertos/freertos/portable/heap_3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel V10.2.0 3 | * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | * this software and associated documentation files (the "Software"), to deal in 7 | * the Software without restriction, including without limitation the rights to 8 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | * the Software, and to permit persons to whom the Software is furnished to do so, 10 | * subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * 22 | * http://www.FreeRTOS.org 23 | * http://aws.amazon.com/freertos 24 | * 25 | * 1 tab == 4 spaces! 26 | */ 27 | 28 | 29 | /* 30 | * Implementation of pvPortMalloc() and vPortFree() that relies on the 31 | * compilers own malloc() and free() implementations. 32 | * 33 | * This file can only be used if the linker is configured to to generate 34 | * a heap memory area. 35 | * 36 | * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the 37 | * memory management pages of http://www.FreeRTOS.org for more information. 38 | */ 39 | 40 | #include 41 | 42 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 43 | all the API functions to use the MPU wrappers. That should only be done when 44 | task.h is included from an application file. */ 45 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 46 | 47 | #include "FreeRTOS.h" 48 | #include "task.h" 49 | 50 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 51 | 52 | #if( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) 53 | #error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0 54 | #endif 55 | 56 | /*-----------------------------------------------------------*/ 57 | 58 | void *pvPortMalloc( size_t xWantedSize ) 59 | { 60 | void *pvReturn; 61 | 62 | vTaskSuspendAll(); 63 | { 64 | pvReturn = malloc( xWantedSize ); 65 | traceMALLOC( pvReturn, xWantedSize ); 66 | } 67 | ( void ) xTaskResumeAll(); 68 | 69 | #if( configUSE_MALLOC_FAILED_HOOK == 1 ) 70 | { 71 | if( pvReturn == NULL ) 72 | { 73 | extern void vApplicationMallocFailedHook( void ); 74 | vApplicationMallocFailedHook(); 75 | } 76 | } 77 | #endif 78 | 79 | return pvReturn; 80 | } 81 | /*-----------------------------------------------------------*/ 82 | 83 | void vPortFree( void *pv ) 84 | { 85 | if( pv ) 86 | { 87 | vTaskSuspendAll(); 88 | { 89 | free( pv ); 90 | traceFREE( pv, 0 ); 91 | } 92 | ( void ) xTaskResumeAll(); 93 | } 94 | } 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/amazon-freertos/include/threading_alt.h: -------------------------------------------------------------------------------- 1 | #ifndef __THREADING_ALT_H__ 2 | #define __THREADING_ALT_H__ 3 | 4 | 5 | #include "FreeRTOS.h" 6 | #include "semphr.h" 7 | 8 | typedef struct 9 | { 10 | SemaphoreHandle_t mutex; 11 | char is_valid; 12 | } mbedtls_threading_mutex_t; 13 | 14 | extern void mbedtls_threading_set_alt( void ( * mutex_init )( mbedtls_threading_mutex_t * ), 15 | void ( * mutex_free )( mbedtls_threading_mutex_t * ), 16 | int ( * mutex_lock )( mbedtls_threading_mutex_t * ), 17 | int ( * mutex_unlock )( mbedtls_threading_mutex_t * ) ); 18 | 19 | 20 | #endif /* ifndef __THREADING_ALT_H__ */ 21 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/amazon-freertos/license/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/board/peripherals.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef _PERIPHERALS_H_ 7 | #define _PERIPHERALS_H_ 8 | 9 | /*********************************************************************************************************************** 10 | * Included files 11 | **********************************************************************************************************************/ 12 | #include "fsl_common.h" 13 | 14 | #if defined(__cplusplus) 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | /*********************************************************************************************************************** 19 | * Initialization functions 20 | **********************************************************************************************************************/ 21 | 22 | void BOARD_InitPeripherals(void); 23 | 24 | /*********************************************************************************************************************** 25 | * BOARD_InitBootPeripherals function 26 | **********************************************************************************************************************/ 27 | void BOARD_InitBootPeripherals(void); 28 | 29 | #if defined(__cplusplus) 30 | } 31 | #endif 32 | 33 | #endif /* _PERIPHERALS_H_ */ 34 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/component/serial_manager/serial_port_uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef __SERIAL_PORT_UART_H__ 10 | #define __SERIAL_PORT_UART_H__ 11 | 12 | /*! 13 | * @addtogroup serial_port_uart 14 | * @{ 15 | */ 16 | 17 | /******************************************************************************* 18 | * Definitions 19 | ******************************************************************************/ 20 | /*! @brief serial port uart handle size*/ 21 | #if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U)) 22 | #define SERIAL_PORT_UART_HANDLE_SIZE (166U) 23 | #else 24 | #define SERIAL_PORT_UART_HANDLE_SIZE (4U) 25 | #endif 26 | 27 | /*! @brief serial port uart parity mode*/ 28 | typedef enum _serial_port_uart_parity_mode 29 | { 30 | kSerialManager_UartParityDisabled = 0x0U, /*!< Parity disabled */ 31 | kSerialManager_UartParityEven = 0x1U, /*!< Parity even enabled */ 32 | kSerialManager_UartParityOdd = 0x2U, /*!< Parity odd enabled */ 33 | } serial_port_uart_parity_mode_t; 34 | 35 | /*! @brief serial port uart stop bit count*/ 36 | typedef enum _serial_port_uart_stop_bit_count 37 | { 38 | kSerialManager_UartOneStopBit = 0U, /*!< One stop bit */ 39 | kSerialManager_UartTwoStopBit = 1U, /*!< Two stop bits */ 40 | } serial_port_uart_stop_bit_count_t; 41 | 42 | /*! @brief serial port uart config struct*/ 43 | typedef struct _serial_port_uart_config 44 | { 45 | uint32_t clockRate; /*!< clock rate */ 46 | uint32_t baudRate; /*!< baud rate */ 47 | serial_port_uart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */ 48 | serial_port_uart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */ 49 | uint8_t instance; /*!< Instance (0 - UART0, 1 - UART1, ...), detail information 50 | please refer to the SOC corresponding RM. */ 51 | uint8_t enableRx; /*!< Enable RX */ 52 | uint8_t enableTx; /*!< Enable TX */ 53 | } serial_port_uart_config_t; 54 | /*! @} */ 55 | #endif /* __SERIAL_PORT_UART_H__ */ 56 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/device/fsl_device_registers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 Freescale Semiconductor, Inc. 3 | * Copyright 2016-2018 NXP 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * 7 | */ 8 | 9 | #ifndef __FSL_DEVICE_REGISTERS_H__ 10 | #define __FSL_DEVICE_REGISTERS_H__ 11 | 12 | /* 13 | * Include the cpu specific register header files. 14 | * 15 | * The CPU macro should be declared in the project or makefile. 16 | */ 17 | #if (defined(CPU_MIMXRT1062CVJ5A) || defined(CPU_MIMXRT1062CVL5A) || defined(CPU_MIMXRT1062DVJ6A) || \ 18 | defined(CPU_MIMXRT1062DVL6A)) 19 | 20 | #define MIMXRT1062_SERIES 21 | 22 | /* CMSIS-style register definitions */ 23 | #include "MIMXRT1062.h" 24 | /* CPU specific feature definitions */ 25 | #include "MIMXRT1062_features.h" 26 | 27 | #else 28 | #error "No valid CPU defined!" 29 | #endif 30 | 31 | #endif /* __FSL_DEVICE_REGISTERS_H__ */ 32 | 33 | /******************************************************************************* 34 | * EOF 35 | ******************************************************************************/ 36 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/doc/amazon-freertos/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the directories found at the root of the Amazon FreeRTOS 2 | distribution. 3 | 4 | lib: 5 | Contains the implementation of AWS and third party libraries. AWS libraries use 6 | abstracted interfaces to enable interchangeability and facilitate porting to new 7 | hardware. 8 | 9 | demos: 10 | Contains a set of pre-configured demo projects for various target platforms. 11 | The projects in the demos directory build the libraries from the lib directory. 12 | 13 | tests: 14 | Various module and integration tests that use the Unity framework. These tests 15 | also support the Amazon FreeRTOS Qualification Program (AFQP). 16 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/doc/amazon-freertos/freertos/portable/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and/or compiler. 4 | 5 | 6 | + The FreeRTOS/Source/Portable/MemMang directory contains the five sample 7 | memory allocators as described on the http://www.FreeRTOS.org WEB site. 8 | 9 | + The other directories each contain files specific to a particular 10 | microcontroller or compiler, where the directory name denotes the compiler 11 | specific files the directory contains. 12 | 13 | 14 | 15 | For example, if you are interested in the [compiler] port for the [architecture] 16 | microcontroller, then the port specific files are contained in 17 | FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the 18 | only port you are interested in then all the other directories can be 19 | ignored. 20 | 21 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/doc/amazon-freertos/license/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the subdirectories found in the /lib directory of the Amazon 2 | FreeRTOS distribution. 3 | 4 | third_party: 5 | Contains the third party libraries, including vendor supplied device specific 6 | driver libraries, required to build target specific demo projects. Organized by 7 | vendor. 8 | 9 | All other directories: 10 | Contain the implementation of a single Amazon FreeRTOS library. -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/drivers/freertos/fsl_lpi2c_freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | #ifndef __FSL_LPI2C_FREERTOS_H__ 9 | #define __FSL_LPI2C_FREERTOS_H__ 10 | 11 | #include "FreeRTOS.h" 12 | #include "portable.h" 13 | #include "semphr.h" 14 | 15 | #include "fsl_lpi2c.h" 16 | 17 | /*! 18 | * @addtogroup lpi2c_freertos_driver LPI2C FreeRTOS driver 19 | * @{ 20 | */ 21 | 22 | /******************************************************************************* 23 | * Definitions 24 | ******************************************************************************/ 25 | 26 | /*! @name Driver version */ 27 | /*@{*/ 28 | /*! @brief LPI2C freertos driver version 2.1.5. */ 29 | #define FSL_LPI2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 1, 5)) 30 | /*@}*/ 31 | 32 | /*! 33 | * @cond RTOS_PRIVATE 34 | * @brief LPI2C FreeRTOS handle 35 | */ 36 | typedef struct _lpi2c_rtos_handle 37 | { 38 | LPI2C_Type *base; /*!< LPI2C base address */ 39 | lpi2c_master_handle_t drv_handle; /*!< Handle of the underlying driver, treated as opaque by the RTOS layer */ 40 | status_t async_status; 41 | SemaphoreHandle_t mutex; /*!< Mutex to lock the handle during a trasfer */ 42 | SemaphoreHandle_t semaphore; /*!< Semaphore to notify and unblock task when transfer ends */ 43 | } lpi2c_rtos_handle_t; 44 | /*! \endcond */ 45 | 46 | /******************************************************************************* 47 | * API 48 | ******************************************************************************/ 49 | 50 | #if defined(__cplusplus) 51 | extern "C" { 52 | #endif 53 | 54 | /*! 55 | * @name LPI2C RTOS Operation 56 | * @{ 57 | */ 58 | 59 | /*! 60 | * @brief Initializes LPI2C. 61 | * 62 | * This function initializes the LPI2C module and related RTOS context. 63 | * 64 | * @param handle The RTOS LPI2C handle, the pointer to an allocated space for RTOS context. 65 | * @param base The pointer base address of the LPI2C instance to initialize. 66 | * @param masterConfig Configuration structure to set-up LPI2C in master mode. 67 | * @param srcClock_Hz Frequency of input clock of the LPI2C module. 68 | * @return status of the operation. 69 | */ 70 | status_t LPI2C_RTOS_Init(lpi2c_rtos_handle_t *handle, 71 | LPI2C_Type *base, 72 | const lpi2c_master_config_t *masterConfig, 73 | uint32_t srcClock_Hz); 74 | 75 | /*! 76 | * @brief Deinitializes the LPI2C. 77 | * 78 | * This function deinitializes the LPI2C module and related RTOS context. 79 | * 80 | * @param handle The RTOS LPI2C handle. 81 | */ 82 | status_t LPI2C_RTOS_Deinit(lpi2c_rtos_handle_t *handle); 83 | 84 | /*! 85 | * @brief Performs I2C transfer. 86 | * 87 | * This function performs an I2C transfer using LPI2C module according to data given in the transfer structure. 88 | * 89 | * @param handle The RTOS LPI2C handle. 90 | * @param transfer Structure specifying the transfer parameters. 91 | * @return status of the operation. 92 | */ 93 | status_t LPI2C_RTOS_Transfer(lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer); 94 | 95 | /*! 96 | * @} 97 | */ 98 | 99 | #if defined(__cplusplus) 100 | } 101 | #endif 102 | 103 | /*! 104 | * @} 105 | */ 106 | 107 | #endif /* __FSL_LPI2C_FREERTOS_H__ */ 108 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/libs/libarm_cortexM7lfsp_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/slmx4_projects/lux_demo/libs/libarm_cortexM7lfsp_math.a -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/readme.md: -------------------------------------------------------------------------------- 1 | # Lux Demo 2 | 3 | This program is simple demonstration of the LTR308 Ambient Light Sensor 4 | 5 | Hardware required: 6 | - SLMX4-HW 7 | - epam-x4 (or other pin-compatible x4 module) 8 | 9 | When the program runs, the lux reading is displayed and the RGB LED is lit 10 | green with its brightness controlled by the lux value. 11 | 12 | The ambient lux value should be relatively constant normally. When you block 13 | the light (with you hand or finger) the lux value will drop. When you shine a 14 | light at the sensor, the lux value should increase. -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/source/demo.c: -------------------------------------------------------------------------------- 1 | /** 2 | This program is simple demonstration of the LTR308 Ambient Light Sensor 3 | 4 | Hardware required: 5 | - SLMX4-HW 6 | - epam-x4 (or other pin-compatible x4 module) 7 | 8 | When the program runs, the lux reading is displayed and the RGB LED is lit 9 | green with its brightness controlled by the lux value. 10 | 11 | The ambient lux value should be relatively constant normally. When you block 12 | the light (with you hand or finger) the lux value will drop. When you shine a 13 | light at the sensor, the lux value should increase. 14 | 15 | @author 16 | Justin Hadella 17 | 18 | @copyright (c) 2021 Sensor Logic 19 | */ 20 | 21 | /** 22 | @file demo.c 23 | @brief demonstration of ltr308 usage 24 | */ 25 | #include "fsl_debug_console.h" 26 | 27 | // FreeRTOS includes 28 | #include "FreeRTOS.h" 29 | #include "task.h" 30 | #include "queue.h" 31 | #include "timers.h" 32 | 33 | // Platform includes 34 | #include "slmx4_freertos.h" 35 | #include "ltr308_driver.h" 36 | 37 | // ----------------------------------------------------------------------------- 38 | // Definitions 39 | // ----------------------------------------------------------------------------- 40 | 41 | #define lux_task_PRIORITY (configMAX_PRIORITIES - 1) 42 | 43 | // ----------------------------------------------------------------------------- 44 | // Function Prototypes 45 | // ----------------------------------------------------------------------------- 46 | 47 | static void lux_task(void *pvParameters); 48 | 49 | // ============================================================================= 50 | // Main Program 51 | // ============================================================================= 52 | 53 | /** 54 | @brief Application entry point 55 | */ 56 | void main(void) 57 | { 58 | int status = platform__init(); 59 | if (status) 60 | { 61 | PRINTF("platform__init() = %d\n", status); 62 | return; 63 | } 64 | 65 | if (xTaskCreate(lux_task, "lux_task", configMINIMAL_STACK_SIZE + 1000, NULL, lux_task_PRIORITY, NULL) != pdPASS) 66 | { 67 | PRINTF("Task creation failed!.\r\n"); 68 | while (1) 69 | { 70 | continue; 71 | } 72 | } 73 | 74 | vTaskStartScheduler(); 75 | for (;;) 76 | { 77 | continue; 78 | } 79 | } 80 | 81 | // ~~=~~=~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~= 82 | // FreeRTOS Tasks 83 | // ~~=~~=~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~~~=~~= 84 | 85 | static void lux_task(void *pvParameters) 86 | { 87 | float lux = 0.0f; 88 | 89 | // Activate lux sensor 90 | int status = ltr308__set_active(); 91 | if (status) 92 | { 93 | PRINTF("ltr308__set_active() = %d\n", status); 94 | return; 95 | } 96 | 97 | // Read ID 98 | uint8_t lux_id = 0; 99 | status = ltr308__read_id(&lux_id); 100 | if (status) 101 | { 102 | PRINTF("ltr308__read_id() = %d\n", status); 103 | return; 104 | } 105 | PRINTF("ltr308 id = 0x%x (should be 0xB1)\n", lux_id); 106 | 107 | // Customize 108 | ltr308__set_meas_rate(ALS_RESOLUTION_17BIT, ALS_MEAS_RATE_50MS); 109 | ltr308__set_gain(ALS_GAIN_18); 110 | 111 | // Test loop 112 | for (;;) 113 | { 114 | ltr308__read_lux(&lux); 115 | PRINTF("lux = %.2f\n", lux); 116 | 117 | // Clamp lux 118 | if (lux > 1000.0f) lux = 1000.0f; 119 | 120 | // Set RGB LED to green but intensity is based on lux level 121 | uint8_t green_level = (uint8_t)(lux * 255.0f / 1000.0f); 122 | platform__set_rgb_led(green_level << 8); 123 | 124 | platform__delay(50); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/utilities/fsl_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | * 8 | */ 9 | 10 | #ifndef _FSL_STR_H 11 | #define _FSL_STR_H 12 | 13 | #include "fsl_common.h" 14 | 15 | /*! 16 | * @addtogroup debugconsole 17 | * @{ 18 | */ 19 | 20 | /******************************************************************************* 21 | * Prototypes 22 | ******************************************************************************/ 23 | #if defined(__cplusplus) 24 | extern "C" { 25 | #endif /* __cplusplus */ 26 | 27 | /*! 28 | * @brief A function pointer which is used when format printf log. 29 | */ 30 | typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len); 31 | 32 | /*! 33 | * @brief This function outputs its parameters according to a formatted string. 34 | * 35 | * @note I/O is performed by calling given function pointer using following 36 | * (*func_ptr)(c); 37 | * 38 | * @param[in] fmt Format string for printf. 39 | * @param[in] ap Arguments to printf. 40 | * @param[in] buf pointer to the buffer 41 | * @param cb print callbck function pointer 42 | * 43 | * @return Number of characters to be print 44 | */ 45 | int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb); 46 | 47 | /*! 48 | * @brief Converts an input line of ASCII characters based upon a provided 49 | * string format. 50 | * 51 | * @param[in] line_ptr The input line of ASCII data. 52 | * @param[in] format Format first points to the format string. 53 | * @param[in] args_ptr The list of parameters. 54 | * 55 | * @return Number of input items converted and assigned. 56 | * @retval IO_EOF When line_ptr is empty string "". 57 | */ 58 | int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr); 59 | 60 | #if defined(__cplusplus) 61 | } 62 | #endif /* __cplusplus */ 63 | 64 | /*! @} */ 65 | 66 | #endif /* _FSL_STR_H */ 67 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/xethru_xep/x4driver.md: -------------------------------------------------------------------------------- 1 | # X4 Driver 2 | 3 | This version of the x4driver is `3.4.7`. 4 | 5 | ## Legacy Conversion: 6 | | xep | fex4 | notes | 7 | | :-- | :--- | :---- | 8 | 9 | 10 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/xethru_xep/xtcompiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * 5 | */ 6 | 7 | #ifndef XTCOMPILER_H 8 | #define XTCOMPILER_H 9 | 10 | #ifdef UNUSED 11 | #elif defined(__GNUC__) 12 | // # define UNUSED(x) UNUSED_ ## x __attribute__ ((unused)) 13 | # define UNUSED(x) (void)(x) 14 | #elif defined(__LCLINT__) 15 | # define UNUSED(x) /*@unused@*/ x 16 | #elif defined(__cplusplus) 17 | # define UNUSED(x) 18 | #else 19 | # define UNUSED(x) x 20 | #endif 21 | 22 | 23 | 24 | #endif // XTCOMPILER_H -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/xip/fsl_flexspi_nor_boot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "fsl_flexspi_nor_boot.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_device" 13 | #endif 14 | 15 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 16 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 17 | __attribute__((section(".boot_hdr.ivt"))) 18 | #elif defined(__ICCARM__) 19 | #pragma location=".boot_hdr.ivt" 20 | #endif 21 | /************************************* 22 | * IVT Data 23 | *************************************/ 24 | const ivt image_vector_table = { 25 | IVT_HEADER, /* IVT Header */ 26 | IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ 27 | IVT_RSVD, /* Reserved = 0 */ 28 | (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ 29 | (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ 30 | (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ 31 | (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ 32 | IVT_RSVD /* Reserved = 0 */ 33 | }; 34 | 35 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 36 | __attribute__((section(".boot_hdr.boot_data"))) 37 | #elif defined(__ICCARM__) 38 | #pragma location=".boot_hdr.boot_data" 39 | #endif 40 | /************************************* 41 | * Boot Data 42 | *************************************/ 43 | const BOOT_DATA_T boot_data = { 44 | FLASH_BASE, /* boot start location */ 45 | FLASH_SIZE, /* size */ 46 | PLUGIN_FLAG, /* Plugin flag*/ 47 | 0xFFFFFFFF /* empty - extra data word */ 48 | }; 49 | #endif 50 | 51 | 52 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/xip/slmx4_flexspi_nor_config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "slmx4_flexspi_nor_config.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_board" 13 | #endif 14 | 15 | /******************************************************************************* 16 | * Code 17 | ******************************************************************************/ 18 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 19 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 20 | __attribute__((section(".boot_hdr.conf"))) 21 | #elif defined(__ICCARM__) 22 | #pragma location = ".boot_hdr.conf" 23 | #endif 24 | 25 | const flexspi_nor_config_t qspiflash_config = { 26 | .memConfig = 27 | { 28 | .tag = FLEXSPI_CFG_BLK_TAG, 29 | .version = FLEXSPI_CFG_BLK_VERSION, 30 | .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad, 31 | .csHoldTime = 3u, 32 | .csSetupTime = 3u, 33 | // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock 34 | .sflashPadType = kSerialFlash_4Pads, 35 | .serialClkFreq = kFlexSpiSerialClk_100MHz, 36 | .sflashA1Size = 4u * 1024u * 1024u, 37 | .lookupTable = 38 | { 39 | // Read LUTs 40 | FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18), 41 | FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04), 42 | }, 43 | }, 44 | .pageSize = 256u, 45 | .sectorSize = 4u * 1024u, 46 | .blockSize = 64u * 1024u, 47 | .isUniformBlockSize = false, 48 | }; 49 | #endif /* XIP_BOOT_HEADER_ENABLE */ 50 | -------------------------------------------------------------------------------- /slmx4_projects/lux_demo/xip/slmx4_sdram_ini_dcd.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef __SLMX4_SDRAM_INI_DCD__ 7 | #define __SLMX4_SDRAM_INI_DCD__ 8 | 9 | #include 10 | 11 | /*! @name Driver version */ 12 | /*@{*/ 13 | /*! @brief XIP_BOARD driver version 2.0.0. */ 14 | #define FSL_XIP_BOARD_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 15 | /*@}*/ 16 | 17 | /************************************* 18 | * DCD Data 19 | *************************************/ 20 | #define DCD_TAG_HEADER (0xD2) 21 | #define DCD_VERSION (0x41) 22 | #define DCD_TAG_HEADER_SHIFT (24) 23 | #define DCD_ARRAY_SIZE 1 24 | 25 | #endif /* __SLMX4_SDRAM_INI_DCD__ */ 26 | -------------------------------------------------------------------------------- /slmx4_projects/readme.md: -------------------------------------------------------------------------------- 1 | # SLMX4 Projects 2 | 3 | [Back](../) 4 | 5 | This repository contains various firmware projects for the SensorLogic SLMX4 6 | module. 7 | 8 | These projects require the use of the [MCUXpresso](https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE?tab=Design_Tools_Tab) IDE and an appropriate [JTAG emulator](https://www.nxp.com/design/microcontrollers-developer-resources/lpc-link2:OM13054). 9 | 10 | ## Setup MCUXpresso 11 | 12 | Once MCUXpresso is installed, when the program is started it will ask the user 13 | to create a workspace. _The location isn't critical, except when new projects 14 | will be created in the future, MCUXpresso will use the workspace folder as the 15 | default._ 16 | 17 | Download the [NXP SDK](https://www.dropbox.com/s/mu2ej0ns24gxljw/SDK_2_10_0_EVK-MIMXRT1060.zip?dl=0) 18 | and drag the file into the 'Installed SDKs' tab at the bottom of the Window. 19 | 20 | To import a project, choose 'File->Open Projects from File System...' and 21 | in the 'Import source:' text box, select the folder where the code repository 22 | was downloaded to. Here, you can select all, or a just of subset of projects 23 | to import. 24 | 25 | ## Projects 26 | - **[button_demo](button_demo)** 27 | This demonstrates using user buttons to execute actions based on using a 28 | FreeRTOS "one-shot" timer 29 | - **[button_demo2](button_demo2)** 30 | This demonstrates using user buttons to execute actions based on how long the 31 | button is pressed for. 32 | - **[led_blink](led_blink)** 33 | This demonstrates how to use the LEDs on the SLMX4. 34 | - **[lux_demo](lux_demo)** 35 | This demonstrates how to use the LUX sensor on the SLMX4. 36 | - **[vcom_xep_matlab_server](vcom_xep_matlab_server)** 37 | This exposes the USB on the SLMX4 as a virtual COM part and instantiates a server that will commuincate with the 38 | [vcom_xep_radar_connector](../matlab/vcom_xep_radar_connector.m) client, using MATLAB. The Xethru `xep` driver enables full communication, 39 | parameter configuration, and data streaming to/from the X4 radar SoC, the primary sensing technology on the SLMX4. 40 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/.gitignore: -------------------------------------------------------------------------------- 1 | /Debug/ 2 | /Release/ 3 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | vcom_xep_matlab_server 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 15 | clean,full,incremental, 16 | 17 | 18 | 19 | 20 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 21 | full,incremental, 22 | 23 | 24 | 25 | 26 | 27 | org.eclipse.cdt.core.cnature 28 | com.nxp.mcuxpresso.core.datamodels.sdkNature 29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 31 | org.eclipse.xtext.ui.shared.xtextNature 32 | 33 | 34 | 35 | board 36 | 2 37 | PROJECT_LOC/board 38 | 39 | 40 | xip 41 | 2 42 | PROJECT_LOC/xip 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/CMSIS/arm_const_structs.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Project: CMSIS DSP Library 3 | * Title: arm_const_structs.h 4 | * Description: Constant structs that are initialized for user convenience. 5 | * For example, some can be given as arguments to the arm_cfft_f32() function. 6 | * 7 | * $Date: 27. January 2017 8 | * $Revision: V.1.5.1 9 | * 10 | * Target Processor: Cortex-M cores 11 | * -------------------------------------------------------------------- */ 12 | /* 13 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved. 14 | * 15 | * SPDX-License-Identifier: Apache-2.0 16 | * 17 | * Licensed under the Apache License, Version 2.0 (the License); you may 18 | * not use this file except in compliance with the License. 19 | * You may obtain a copy of the License at 20 | * 21 | * www.apache.org/licenses/LICENSE-2.0 22 | * 23 | * Unless required by applicable law or agreed to in writing, software 24 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26 | * See the License for the specific language governing permissions and 27 | * limitations under the License. 28 | */ 29 | 30 | #ifndef _ARM_CONST_STRUCTS_H 31 | #define _ARM_CONST_STRUCTS_H 32 | 33 | #include "arm_math.h" 34 | #include "arm_common_tables.h" 35 | 36 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16; 37 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32; 38 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64; 39 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128; 40 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256; 41 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512; 42 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024; 43 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048; 44 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096; 45 | 46 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16; 47 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32; 48 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64; 49 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128; 50 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256; 51 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512; 52 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024; 53 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048; 54 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096; 55 | 56 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16; 57 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32; 58 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64; 59 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128; 60 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256; 61 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512; 62 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024; 63 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048; 64 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/CMSIS/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/amazon-freertos/freertos/portable/ReadMe.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://www.freertos.org/a00111.html 5 | IDList= 6 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/amazon-freertos/freertos/portable/heap_3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel V10.2.0 3 | * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | * this software and associated documentation files (the "Software"), to deal in 7 | * the Software without restriction, including without limitation the rights to 8 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | * the Software, and to permit persons to whom the Software is furnished to do so, 10 | * subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * 22 | * http://www.FreeRTOS.org 23 | * http://aws.amazon.com/freertos 24 | * 25 | * 1 tab == 4 spaces! 26 | */ 27 | 28 | 29 | /* 30 | * Implementation of pvPortMalloc() and vPortFree() that relies on the 31 | * compilers own malloc() and free() implementations. 32 | * 33 | * This file can only be used if the linker is configured to to generate 34 | * a heap memory area. 35 | * 36 | * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the 37 | * memory management pages of http://www.FreeRTOS.org for more information. 38 | */ 39 | 40 | #include 41 | 42 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 43 | all the API functions to use the MPU wrappers. That should only be done when 44 | task.h is included from an application file. */ 45 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 46 | 47 | #include "FreeRTOS.h" 48 | #include "task.h" 49 | 50 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 51 | 52 | #if( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) 53 | #error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0 54 | #endif 55 | 56 | /*-----------------------------------------------------------*/ 57 | 58 | void *pvPortMalloc( size_t xWantedSize ) 59 | { 60 | void *pvReturn; 61 | 62 | vTaskSuspendAll(); 63 | { 64 | pvReturn = malloc( xWantedSize ); 65 | traceMALLOC( pvReturn, xWantedSize ); 66 | } 67 | ( void ) xTaskResumeAll(); 68 | 69 | #if( configUSE_MALLOC_FAILED_HOOK == 1 ) 70 | { 71 | if( pvReturn == NULL ) 72 | { 73 | extern void vApplicationMallocFailedHook( void ); 74 | vApplicationMallocFailedHook(); 75 | } 76 | } 77 | #endif 78 | 79 | return pvReturn; 80 | } 81 | /*-----------------------------------------------------------*/ 82 | 83 | void vPortFree( void *pv ) 84 | { 85 | if( pv ) 86 | { 87 | vTaskSuspendAll(); 88 | { 89 | free( pv ); 90 | traceFREE( pv, 0 ); 91 | } 92 | ( void ) xTaskResumeAll(); 93 | } 94 | } 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/amazon-freertos/include/threading_alt.h: -------------------------------------------------------------------------------- 1 | #ifndef __THREADING_ALT_H__ 2 | #define __THREADING_ALT_H__ 3 | 4 | 5 | #include "FreeRTOS.h" 6 | #include "semphr.h" 7 | 8 | typedef struct 9 | { 10 | SemaphoreHandle_t mutex; 11 | char is_valid; 12 | } mbedtls_threading_mutex_t; 13 | 14 | extern void mbedtls_threading_set_alt( void ( * mutex_init )( mbedtls_threading_mutex_t * ), 15 | void ( * mutex_free )( mbedtls_threading_mutex_t * ), 16 | int ( * mutex_lock )( mbedtls_threading_mutex_t * ), 17 | int ( * mutex_unlock )( mbedtls_threading_mutex_t * ) ); 18 | 19 | 20 | #endif /* ifndef __THREADING_ALT_H__ */ 21 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/amazon-freertos/license/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/board/peripherals.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | /* clang-format off */ 7 | /* TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* 8 | !!GlobalInfo 9 | product: Peripherals v6.0 10 | processor: MIMXRT1062xxxxA 11 | package_id: MIMXRT1062DVJ6A 12 | mcu_data: ksdk2_0 13 | processor_version: 6.0.1 14 | functionalGroups: 15 | - name: BOARD_InitPeripherals 16 | called_from_default_init: true 17 | selectedCore: core0 18 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/ 19 | 20 | /* TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* 21 | component: 22 | - type: 'system' 23 | - type_id: 'system_54b53072540eeeb8f8e9343e71f28176' 24 | - global_system_definitions: [] 25 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/ 26 | 27 | /* TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* 28 | component: 29 | - type: 'msg' 30 | - type_id: 'msg_6e2baaf3b97dbeef01c0043275f9a0e7' 31 | - global_messages: [] 32 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/ 33 | /* clang-format on */ 34 | 35 | /*********************************************************************************************************************** 36 | * Included files 37 | **********************************************************************************************************************/ 38 | #include "peripherals.h" 39 | 40 | /*********************************************************************************************************************** 41 | * Initialization functions 42 | **********************************************************************************************************************/ 43 | void BOARD_InitPeripherals(void) 44 | { 45 | } 46 | 47 | /*********************************************************************************************************************** 48 | * BOARD_InitBootPeripherals function 49 | **********************************************************************************************************************/ 50 | void BOARD_InitBootPeripherals(void) 51 | { 52 | BOARD_InitPeripherals(); 53 | } 54 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/board/peripherals.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef _PERIPHERALS_H_ 7 | #define _PERIPHERALS_H_ 8 | 9 | #if defined(__cplusplus) 10 | extern "C" { 11 | #endif /* __cplusplus */ 12 | 13 | /*********************************************************************************************************************** 14 | * Initialization functions 15 | **********************************************************************************************************************/ 16 | void BOARD_InitPeripherals(void); 17 | 18 | /*********************************************************************************************************************** 19 | * BOARD_InitBootPeripherals function 20 | **********************************************************************************************************************/ 21 | void BOARD_InitBootPeripherals(void); 22 | 23 | #if defined(__cplusplus) 24 | } 25 | #endif 26 | 27 | #endif /* _PERIPHERALS_H_ */ 28 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/component/serial_manager/serial_port_uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef __SERIAL_PORT_UART_H__ 10 | #define __SERIAL_PORT_UART_H__ 11 | 12 | /*! 13 | * @addtogroup serial_port_uart 14 | * @{ 15 | */ 16 | 17 | /******************************************************************************* 18 | * Definitions 19 | ******************************************************************************/ 20 | /*! @brief serial port uart handle size*/ 21 | #if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U)) 22 | #define SERIAL_PORT_UART_HANDLE_SIZE (166U) 23 | #else 24 | #define SERIAL_PORT_UART_HANDLE_SIZE (4U) 25 | #endif 26 | 27 | /*! @brief serial port uart parity mode*/ 28 | typedef enum _serial_port_uart_parity_mode 29 | { 30 | kSerialManager_UartParityDisabled = 0x0U, /*!< Parity disabled */ 31 | kSerialManager_UartParityEven = 0x1U, /*!< Parity even enabled */ 32 | kSerialManager_UartParityOdd = 0x2U, /*!< Parity odd enabled */ 33 | } serial_port_uart_parity_mode_t; 34 | 35 | /*! @brief serial port uart stop bit count*/ 36 | typedef enum _serial_port_uart_stop_bit_count 37 | { 38 | kSerialManager_UartOneStopBit = 0U, /*!< One stop bit */ 39 | kSerialManager_UartTwoStopBit = 1U, /*!< Two stop bits */ 40 | } serial_port_uart_stop_bit_count_t; 41 | 42 | /*! @brief serial port uart config struct*/ 43 | typedef struct _serial_port_uart_config 44 | { 45 | uint32_t clockRate; /*!< clock rate */ 46 | uint32_t baudRate; /*!< baud rate */ 47 | serial_port_uart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */ 48 | serial_port_uart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */ 49 | uint8_t instance; /*!< Instance (0 - UART0, 1 - UART1, ...), detail information 50 | please refer to the SOC corresponding RM. */ 51 | uint8_t enableRx; /*!< Enable RX */ 52 | uint8_t enableTx; /*!< Enable TX */ 53 | } serial_port_uart_config_t; 54 | /*! @} */ 55 | #endif /* __SERIAL_PORT_UART_H__ */ 56 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/device/fsl_device_registers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 Freescale Semiconductor, Inc. 3 | * Copyright 2016-2018 NXP 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * 7 | */ 8 | 9 | #ifndef __FSL_DEVICE_REGISTERS_H__ 10 | #define __FSL_DEVICE_REGISTERS_H__ 11 | 12 | /* 13 | * Include the cpu specific register header files. 14 | * 15 | * The CPU macro should be declared in the project or makefile. 16 | */ 17 | #if (defined(CPU_MIMXRT1062CVJ5A) || defined(CPU_MIMXRT1062CVL5A) || defined(CPU_MIMXRT1062DVJ6A) || \ 18 | defined(CPU_MIMXRT1062DVL6A)) 19 | 20 | #define MIMXRT1062_SERIES 21 | 22 | /* CMSIS-style register definitions */ 23 | #include "MIMXRT1062.h" 24 | /* CPU specific feature definitions */ 25 | #include "MIMXRT1062_features.h" 26 | 27 | #else 28 | #error "No valid CPU defined!" 29 | #endif 30 | 31 | #endif /* __FSL_DEVICE_REGISTERS_H__ */ 32 | 33 | /******************************************************************************* 34 | * EOF 35 | ******************************************************************************/ 36 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/doc/amazon-freertos/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the directories found at the root of the Amazon FreeRTOS 2 | distribution. 3 | 4 | lib: 5 | Contains the implementation of AWS and third party libraries. AWS libraries use 6 | abstracted interfaces to enable interchangeability and facilitate porting to new 7 | hardware. 8 | 9 | demos: 10 | Contains a set of pre-configured demo projects for various target platforms. 11 | The projects in the demos directory build the libraries from the lib directory. 12 | 13 | tests: 14 | Various module and integration tests that use the Unity framework. These tests 15 | also support the Amazon FreeRTOS Qualification Program (AFQP). 16 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/doc/amazon-freertos/freertos/portable/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and/or compiler. 4 | 5 | 6 | + The FreeRTOS/Source/Portable/MemMang directory contains the five sample 7 | memory allocators as described on the http://www.FreeRTOS.org WEB site. 8 | 9 | + The other directories each contain files specific to a particular 10 | microcontroller or compiler, where the directory name denotes the compiler 11 | specific files the directory contains. 12 | 13 | 14 | 15 | For example, if you are interested in the [compiler] port for the [architecture] 16 | microcontroller, then the port specific files are contained in 17 | FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the 18 | only port you are interested in then all the other directories can be 19 | ignored. 20 | 21 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/doc/amazon-freertos/license/directories.txt: -------------------------------------------------------------------------------- 1 | This file describes the subdirectories found in the /lib directory of the Amazon 2 | FreeRTOS distribution. 3 | 4 | third_party: 5 | Contains the third party libraries, including vendor supplied device specific 6 | driver libraries, required to build target specific demo projects. Organized by 7 | vendor. 8 | 9 | All other directories: 10 | Contain the implementation of a single Amazon FreeRTOS library. -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/drivers/freertos/fsl_lpi2c_freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | #ifndef __FSL_LPI2C_FREERTOS_H__ 9 | #define __FSL_LPI2C_FREERTOS_H__ 10 | 11 | #include "FreeRTOS.h" 12 | #include "portable.h" 13 | #include "semphr.h" 14 | 15 | #include "fsl_lpi2c.h" 16 | 17 | /*! 18 | * @addtogroup lpi2c_freertos_driver LPI2C FreeRTOS driver 19 | * @{ 20 | */ 21 | 22 | /******************************************************************************* 23 | * Definitions 24 | ******************************************************************************/ 25 | 26 | /*! @name Driver version */ 27 | /*@{*/ 28 | /*! @brief LPI2C freertos driver version 2.1.5. */ 29 | #define FSL_LPI2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 1, 5)) 30 | /*@}*/ 31 | 32 | /*! 33 | * @cond RTOS_PRIVATE 34 | * @brief LPI2C FreeRTOS handle 35 | */ 36 | typedef struct _lpi2c_rtos_handle 37 | { 38 | LPI2C_Type *base; /*!< LPI2C base address */ 39 | lpi2c_master_handle_t drv_handle; /*!< Handle of the underlying driver, treated as opaque by the RTOS layer */ 40 | status_t async_status; 41 | SemaphoreHandle_t mutex; /*!< Mutex to lock the handle during a trasfer */ 42 | SemaphoreHandle_t semaphore; /*!< Semaphore to notify and unblock task when transfer ends */ 43 | } lpi2c_rtos_handle_t; 44 | /*! \endcond */ 45 | 46 | /******************************************************************************* 47 | * API 48 | ******************************************************************************/ 49 | 50 | #if defined(__cplusplus) 51 | extern "C" { 52 | #endif 53 | 54 | /*! 55 | * @name LPI2C RTOS Operation 56 | * @{ 57 | */ 58 | 59 | /*! 60 | * @brief Initializes LPI2C. 61 | * 62 | * This function initializes the LPI2C module and related RTOS context. 63 | * 64 | * @param handle The RTOS LPI2C handle, the pointer to an allocated space for RTOS context. 65 | * @param base The pointer base address of the LPI2C instance to initialize. 66 | * @param masterConfig Configuration structure to set-up LPI2C in master mode. 67 | * @param srcClock_Hz Frequency of input clock of the LPI2C module. 68 | * @return status of the operation. 69 | */ 70 | status_t LPI2C_RTOS_Init(lpi2c_rtos_handle_t *handle, 71 | LPI2C_Type *base, 72 | const lpi2c_master_config_t *masterConfig, 73 | uint32_t srcClock_Hz); 74 | 75 | /*! 76 | * @brief Deinitializes the LPI2C. 77 | * 78 | * This function deinitializes the LPI2C module and related RTOS context. 79 | * 80 | * @param handle The RTOS LPI2C handle. 81 | */ 82 | status_t LPI2C_RTOS_Deinit(lpi2c_rtos_handle_t *handle); 83 | 84 | /*! 85 | * @brief Performs I2C transfer. 86 | * 87 | * This function performs an I2C transfer using LPI2C module according to data given in the transfer structure. 88 | * 89 | * @param handle The RTOS LPI2C handle. 90 | * @param transfer Structure specifying the transfer parameters. 91 | * @return status of the operation. 92 | */ 93 | status_t LPI2C_RTOS_Transfer(lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer); 94 | 95 | /*! 96 | * @} 97 | */ 98 | 99 | #if defined(__cplusplus) 100 | } 101 | #endif 102 | 103 | /*! 104 | * @} 105 | */ 106 | 107 | #endif /* __FSL_LPI2C_FREERTOS_H__ */ 108 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/drivers/fsl_dmamux.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #include "fsl_dmamux.h" 10 | 11 | /******************************************************************************* 12 | * Definitions 13 | ******************************************************************************/ 14 | 15 | /* Component ID definition, used by tools. */ 16 | #ifndef FSL_COMPONENT_ID 17 | #define FSL_COMPONENT_ID "platform.drivers.dmamux" 18 | #endif 19 | 20 | /******************************************************************************* 21 | * Prototypes 22 | ******************************************************************************/ 23 | 24 | /*! 25 | * @brief Get instance number for DMAMUX. 26 | * 27 | * @param base DMAMUX peripheral base address. 28 | */ 29 | static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base); 30 | 31 | /******************************************************************************* 32 | * Variables 33 | ******************************************************************************/ 34 | 35 | /*! @brief Array to map DMAMUX instance number to base pointer. */ 36 | static DMAMUX_Type *const s_dmamuxBases[] = DMAMUX_BASE_PTRS; 37 | 38 | #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) 39 | /*! @brief Array to map DMAMUX instance number to clock name. */ 40 | static const clock_ip_name_t s_dmamuxClockName[] = DMAMUX_CLOCKS; 41 | #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */ 42 | 43 | /******************************************************************************* 44 | * Code 45 | ******************************************************************************/ 46 | static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base) 47 | { 48 | uint32_t instance; 49 | 50 | /* Find the instance index from base address mappings. */ 51 | for (instance = 0; instance < ARRAY_SIZE(s_dmamuxBases); instance++) 52 | { 53 | if (s_dmamuxBases[instance] == base) 54 | { 55 | break; 56 | } 57 | } 58 | 59 | assert(instance < ARRAY_SIZE(s_dmamuxBases)); 60 | 61 | return instance; 62 | } 63 | 64 | /*! 65 | * brief Initializes the DMAMUX peripheral. 66 | * 67 | * This function ungates the DMAMUX clock. 68 | * 69 | * param base DMAMUX peripheral base address. 70 | * 71 | */ 72 | void DMAMUX_Init(DMAMUX_Type *base) 73 | { 74 | #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) 75 | CLOCK_EnableClock(s_dmamuxClockName[DMAMUX_GetInstance(base)]); 76 | #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */ 77 | } 78 | 79 | /*! 80 | * brief Deinitializes the DMAMUX peripheral. 81 | * 82 | * This function gates the DMAMUX clock. 83 | * 84 | * param base DMAMUX peripheral base address. 85 | */ 86 | void DMAMUX_Deinit(DMAMUX_Type *base) 87 | { 88 | #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) 89 | CLOCK_DisableClock(s_dmamuxClockName[DMAMUX_GetInstance(base)]); 90 | #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */ 91 | } 92 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/libs/libarm_cortexM7lfsp_math.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/slmx4_projects/vcom_xep_matlab_server/libs/libarm_cortexM7lfsp_math.a -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/source/mat_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | @file mat_handler.h 3 | 4 | Definitions for the Matlab connector data handler 5 | 6 | @par Environment 7 | Environment Independent 8 | 9 | @par Compiler 10 | Compiler Independent 11 | 12 | @author Justin Hadella 13 | 14 | @copyright (c) 2021 Sensor Logic 15 | */ 16 | #ifndef MAT_HANDLER_h 17 | #define MAT_HANDLER_h 18 | 19 | #include 20 | #include 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | // ----------------------------------------------------------------------------- 27 | // Definitions 28 | // ----------------------------------------------------------------------------- 29 | 30 | #define MAT_HANDLER_VERSION "1.0.0" 31 | 32 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 33 | // Public Functions 34 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35 | 36 | /** 37 | Function to initialize components needed in order to handle client requests 38 | when connected 39 | */ 40 | void handle_client_init(); 41 | 42 | /** 43 | Function to handle client requests 44 | 45 | In this version, the client task is a basic TCP server. The server acts like an 46 | infinite loop where it will check to see if there are any commands from the user 47 | to handle. It also will do things like stream the radar data. 48 | */ 49 | void handle_client_request(uint8_t *buf, int n); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | #endif // MAT_HANDLER_h 55 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/source/project.h: -------------------------------------------------------------------------------- 1 | /** 2 | @file project.h 3 | 4 | Definitions for various project related constants 5 | 6 | @note 7 | virtual_com.c contains main() 8 | 9 | @par Environment 10 | Environment Independent 11 | 12 | @par Compiler 13 | Compiler Independent 14 | 15 | @author Justin Hadella 16 | 17 | @copyright (c) 2021 Sensor Logic 18 | */ 19 | #ifndef PROJECT_h 20 | #define PROJECT_h 21 | 22 | // ----------------------------------------------------------------------------- 23 | // Definitions 24 | // ----------------------------------------------------------------------------- 25 | 26 | #define FW_NAME "vcom_xep_matlab_server" 27 | #define FW_VER "1.0.0" 28 | 29 | #define RGB_COLOR_OFF (0x0) 30 | #define RGB_COLOR_RED (0xff0000) 31 | #define RGB_COLOR_GREEN (0x00ff00) 32 | #define RGB_COLOR_BLUE (0x0000ff) 33 | #define RGB_COLOR_YELLOW (0xffff00) 34 | #define RGB_COLOR_CYAN (0x00ffff) 35 | #define RGB_COLOR_VIOLET (0x220033) 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | #endif // PROJECT_h 41 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/usb/device/source/usb_device_ch9.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef __USB_DEVICE_CH9_H__ 10 | #define __USB_DEVICE_CH9_H__ 11 | 12 | /******************************************************************************* 13 | * Definitions 14 | ******************************************************************************/ 15 | /*! 16 | * @addtogroup usb_device_ch9 17 | * @{ 18 | */ 19 | /*! @brief Defines USB device status size when the host request to get device status */ 20 | #define USB_DEVICE_STATUS_SIZE (0x02U) 21 | 22 | /*! @brief Defines USB device interface status size when the host request to get interface status */ 23 | #define USB_INTERFACE_STATUS_SIZE (0x02U) 24 | 25 | /*! @brief Defines USB device endpoint status size when the host request to get endpoint status */ 26 | #define USB_ENDPOINT_STATUS_SIZE (0x02U) 27 | 28 | /*! @brief Defines USB device configuration size when the host request to get current configuration */ 29 | #define USB_CONFIGURE_SIZE (0X01U) 30 | 31 | /*! @brief Defines USB device interface alternate setting size when the host request to get interface alternate setting 32 | */ 33 | #define USB_INTERFACE_SIZE (0X01U) 34 | 35 | /*! @brief Defines USB device status mask */ 36 | #define USB_GET_STATUS_DEVICE_MASK (0x03U) 37 | 38 | /*! @brief Defines USB device interface status mask */ 39 | #define USB_GET_STATUS_INTERFACE_MASK (0x03U) 40 | 41 | /*! @brief Defines USB device endpoint status mask */ 42 | #define USB_GET_STATUS_ENDPOINT_MASK (0x03U) 43 | 44 | /*! @brief Control read and write sequence */ 45 | typedef enum _usb_device_control_read_write_sequence 46 | { 47 | kUSB_DeviceControlPipeSetupStage = 0U, /*!< Setup stage */ 48 | kUSB_DeviceControlPipeDataStage, /*!< Data stage */ 49 | kUSB_DeviceControlPipeStatusStage, /*!< status stage */ 50 | } usb_device_control_read_write_sequence_t; 51 | 52 | #if defined(__cplusplus) 53 | extern "C" { 54 | #endif 55 | 56 | /******************************************************************************* 57 | * API 58 | ******************************************************************************/ 59 | 60 | /*! 61 | * @brief Initializes the control pipes. 62 | * 63 | * The function is used to initialize the control pipes. This function should be called when event 64 | * kUSB_DeviceEventBusReset is received. 65 | * 66 | * @param[in] handle The device handle. 67 | * @param[in] param The event parameter. 68 | * 69 | * @return A USB error code or kStatus_USB_Success. 70 | */ 71 | extern usb_status_t USB_DeviceControlPipeInit(usb_device_handle handle, void *param); 72 | 73 | #if defined(__cplusplus) 74 | } 75 | #endif 76 | 77 | /*! @}*/ 78 | 79 | #endif /* __USB_DEVICE_CH9_H__ */ 80 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/usb/phy/usb_phy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 | * Copyright 2016 - 2017 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | #ifndef __USB_PHY_H__ 9 | #define __USB_PHY_H__ 10 | 11 | /******************************************************************************* 12 | * Definitions 13 | ******************************************************************************/ 14 | typedef struct _usb_phy_config_struct 15 | { 16 | uint8_t D_CAL; /* Decode to trim the nominal 17.78mA current source */ 17 | uint8_t TXCAL45DP; /* Decode to trim the nominal 45-Ohm series termination resistance to the USB_DP output pin */ 18 | uint8_t TXCAL45DM; /* Decode to trim the nominal 45-Ohm series termination resistance to the USB_DM output pin */ 19 | } usb_phy_config_struct_t; 20 | 21 | #if defined(__cplusplus) 22 | extern "C" { 23 | #endif 24 | 25 | /******************************************************************************* 26 | * API 27 | ******************************************************************************/ 28 | /*! 29 | * @brief EHCI PHY get USB phy bass address. 30 | * 31 | * This function is used to get USB phy bass address. 32 | * 33 | * @param[in] controllerId EHCI controller ID; See the #usb_controller_index_t. 34 | * 35 | * @retval USB phy bass address. 36 | */ 37 | extern void *USB_EhciPhyGetBase(uint8_t controllerId); 38 | 39 | /*! 40 | * @brief EHCI PHY initialization. 41 | * 42 | * This function initializes the EHCI PHY IP. 43 | * 44 | * @param[in] controllerId EHCI controller ID; See the #usb_controller_index_t. 45 | * @param[in] freq The external input clock. 46 | * 47 | * @retval kStatus_USB_Success Cancel successfully. 48 | * @retval kStatus_USB_Error The freq value is incorrect. 49 | */ 50 | extern uint32_t USB_EhciPhyInit(uint8_t controllerId, uint32_t freq, usb_phy_config_struct_t *phyConfig); 51 | 52 | /*! 53 | * @brief ehci phy initialization for suspend and resume. 54 | * 55 | * This function initialize ehci phy IP for suspend and resume. 56 | * 57 | * @param[in] controllerId ehci controller id, please reference to #usb_controller_index_t. 58 | * @param[in] freq the external input clock. 59 | * for example: if the external input clock is 16M, the parameter freq should be 16000000. 60 | * 61 | * @retval kStatus_USB_Success cancel successfully. 62 | * @retval kStatus_USB_Error the freq value is incorrect. 63 | */ 64 | extern uint32_t USB_EhciLowPowerPhyInit(uint8_t controllerId, uint32_t freq, usb_phy_config_struct_t *phyConfig); 65 | 66 | /*! 67 | * @brief EHCI PHY deinitialization. 68 | * 69 | * This function deinitializes the EHCI PHY IP. 70 | * 71 | * @param[in] controllerId EHCI controller ID; See #usb_controller_index_t. 72 | */ 73 | extern void USB_EhciPhyDeinit(uint8_t controllerId); 74 | 75 | /*! 76 | * @brief EHCI PHY disconnect detection enable or disable. 77 | * 78 | * This function enable/disable the host EHCI disconnect detection. 79 | * 80 | * @param[in] controllerId EHCI controller ID; See #usb_controller_index_t. 81 | * @param[in] enable 82 | * 1U - enable; 83 | * 0U - disable; 84 | */ 85 | extern void USB_EhcihostPhyDisconnectDetectCmd(uint8_t controllerId, uint8_t enable); 86 | 87 | #if defined(__cplusplus) 88 | } 89 | #endif 90 | 91 | #endif /* __USB_PHY_H__ */ 92 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/utilities/fsl_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | * 8 | */ 9 | 10 | #ifndef _FSL_STR_H 11 | #define _FSL_STR_H 12 | 13 | #include "fsl_common.h" 14 | 15 | /*! 16 | * @addtogroup debugconsole 17 | * @{ 18 | */ 19 | 20 | /******************************************************************************* 21 | * Prototypes 22 | ******************************************************************************/ 23 | #if defined(__cplusplus) 24 | extern "C" { 25 | #endif /* __cplusplus */ 26 | 27 | /*! 28 | * @brief A function pointer which is used when format printf log. 29 | */ 30 | typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len); 31 | 32 | /*! 33 | * @brief This function outputs its parameters according to a formatted string. 34 | * 35 | * @note I/O is performed by calling given function pointer using following 36 | * (*func_ptr)(c); 37 | * 38 | * @param[in] fmt Format string for printf. 39 | * @param[in] ap Arguments to printf. 40 | * @param[in] buf pointer to the buffer 41 | * @param cb print callbck function pointer 42 | * 43 | * @return Number of characters to be print 44 | */ 45 | int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb); 46 | 47 | /*! 48 | * @brief Converts an input line of ASCII characters based upon a provided 49 | * string format. 50 | * 51 | * @param[in] line_ptr The input line of ASCII data. 52 | * @param[in] format Format first points to the format string. 53 | * @param[in] args_ptr The list of parameters. 54 | * 55 | * @return Number of input items converted and assigned. 56 | * @retval IO_EOF When line_ptr is empty string "". 57 | */ 58 | int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr); 59 | 60 | #if defined(__cplusplus) 61 | } 62 | #endif /* __cplusplus */ 63 | 64 | /*! @} */ 65 | 66 | #endif /* _FSL_STR_H */ 67 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/xethru_xep/x4driver.md: -------------------------------------------------------------------------------- 1 | # X4 Driver 2 | 3 | This version of the x4driver is `3.4.7`. 4 | 5 | ## Legacy Conversion: 6 | | xep | fex4 | notes | 7 | | :-- | :--- | :---- | 8 | 9 | 10 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/xethru_xep/xtcompiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * 5 | */ 6 | 7 | #ifndef XTCOMPILER_H 8 | #define XTCOMPILER_H 9 | 10 | #ifdef UNUSED 11 | #elif defined(__GNUC__) 12 | // # define UNUSED(x) UNUSED_ ## x __attribute__ ((unused)) 13 | # define UNUSED(x) (void)(x) 14 | #elif defined(__LCLINT__) 15 | # define UNUSED(x) /*@unused@*/ x 16 | #elif defined(__cplusplus) 17 | # define UNUSED(x) 18 | #else 19 | # define UNUSED(x) x 20 | #endif 21 | 22 | 23 | 24 | #endif // XTCOMPILER_H -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/xip/fsl_flexspi_nor_boot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "fsl_flexspi_nor_boot.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_device" 13 | #endif 14 | 15 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 16 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 17 | __attribute__((section(".boot_hdr.ivt"))) 18 | #elif defined(__ICCARM__) 19 | #pragma location=".boot_hdr.ivt" 20 | #endif 21 | /************************************* 22 | * IVT Data 23 | *************************************/ 24 | const ivt image_vector_table = { 25 | IVT_HEADER, /* IVT Header */ 26 | IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ 27 | IVT_RSVD, /* Reserved = 0 */ 28 | (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ 29 | (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ 30 | (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ 31 | (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ 32 | IVT_RSVD /* Reserved = 0 */ 33 | }; 34 | 35 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 36 | __attribute__((section(".boot_hdr.boot_data"))) 37 | #elif defined(__ICCARM__) 38 | #pragma location=".boot_hdr.boot_data" 39 | #endif 40 | /************************************* 41 | * Boot Data 42 | *************************************/ 43 | const BOOT_DATA_T boot_data = { 44 | FLASH_BASE, /* boot start location */ 45 | FLASH_SIZE, /* size */ 46 | PLUGIN_FLAG, /* Plugin flag*/ 47 | 0xFFFFFFFF /* empty - extra data word */ 48 | }; 49 | #endif 50 | 51 | 52 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/xip/slmx4_flexspi_nor_config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | #include "slmx4_flexspi_nor_config.h" 9 | 10 | /* Component ID definition, used by tools. */ 11 | #ifndef FSL_COMPONENT_ID 12 | #define FSL_COMPONENT_ID "platform.drivers.xip_board" 13 | #endif 14 | 15 | /******************************************************************************* 16 | * Code 17 | ******************************************************************************/ 18 | #if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) 19 | #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) 20 | __attribute__((section(".boot_hdr.conf"))) 21 | #elif defined(__ICCARM__) 22 | #pragma location = ".boot_hdr.conf" 23 | #endif 24 | 25 | const flexspi_nor_config_t qspiflash_config = { 26 | .memConfig = 27 | { 28 | .tag = FLEXSPI_CFG_BLK_TAG, 29 | .version = FLEXSPI_CFG_BLK_VERSION, 30 | .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad, 31 | .csHoldTime = 3u, 32 | .csSetupTime = 3u, 33 | // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock 34 | .sflashPadType = kSerialFlash_4Pads, 35 | .serialClkFreq = kFlexSpiSerialClk_100MHz, 36 | .sflashA1Size = 4u * 1024u * 1024u, 37 | .lookupTable = 38 | { 39 | // Read LUTs 40 | FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18), 41 | FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04), 42 | }, 43 | }, 44 | .pageSize = 256u, 45 | .sectorSize = 4u * 1024u, 46 | .blockSize = 64u * 1024u, 47 | .isUniformBlockSize = false, 48 | }; 49 | #endif /* XIP_BOOT_HEADER_ENABLE */ 50 | -------------------------------------------------------------------------------- /slmx4_projects/vcom_xep_matlab_server/xip/slmx4_sdram_ini_dcd.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************** 2 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file 3 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. 4 | **********************************************************************************************************************/ 5 | 6 | #ifndef __SLMX4_SDRAM_INI_DCD__ 7 | #define __SLMX4_SDRAM_INI_DCD__ 8 | 9 | #include 10 | 11 | /*! @name Driver version */ 12 | /*@{*/ 13 | /*! @brief XIP_BOARD driver version 2.0.0. */ 14 | #define FSL_XIP_BOARD_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 15 | /*@}*/ 16 | 17 | /************************************* 18 | * DCD Data 19 | *************************************/ 20 | #define DCD_TAG_HEADER (0xD2) 21 | #define DCD_VERSION (0x41) 22 | #define DCD_TAG_HEADER_SHIFT (24) 23 | #define DCD_ARRAY_SIZE 1 24 | 25 | #endif /* __SLMX4_SDRAM_INI_DCD__ */ 26 | -------------------------------------------------------------------------------- /usb_driver/README.md: -------------------------------------------------------------------------------- 1 | # USB Driver Install 2 | 3 | [Back](../) 4 | 5 | This guide contains steps needed to install the USB driver when Windows doesn't 6 | automatically install it. 7 | 8 | Open the Windows Device Manager. The SLMX4 will display as **MCU VIRTUAL COM DEMO**. 9 | 10 |

11 | 12 |

13 | 14 | Right-click and select 'Update Driver Software...'. 15 | 16 |

17 | 18 |

19 | 20 | When the new window opens, select the bottom button 'Browse my computer...'. 21 | 22 |

23 | 24 |

25 | 26 | Browse for the location of the `usb_driver/inf` folder. In this case, this shows 27 | the indicated folder where I had checked out the github repository. 28 | 29 |

30 | 31 |

32 | 33 | During the installation there will be a Windows Security window. 34 | 35 |

36 | 37 |

38 | 39 | After some time, the driver should install successfully. 40 | 41 |

42 | 43 |

44 | 45 | When we hit 'Close' our SLMX4 device will now show up under the **Ports** 46 | category. In this case, it's COM106 on this test PC. 47 | 48 |

49 | 50 |

51 | 52 | In this last image, the USB VID and PID are shown. This could be added to any 53 | user app to distinguish the SLMX4 from other virtual COM devices. 54 | 55 |

56 | 57 |

58 | -------------------------------------------------------------------------------- /usb_driver/inf/cdc.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SensorLogicInc/modules/7fa4a0c65b3ca930c6f09b23afad048f056c31ca/usb_driver/inf/cdc.cat --------------------------------------------------------------------------------