Added sample TX application.
This commit is contained in:
parent
54979c3d51
commit
bdba0f3b73
|
@ -1,8 +1,9 @@
|
||||||
BasedOnStyle: Google
|
BasedOnStyle: Google
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
AlignConsecutiveMacros: AcrossEmptyLines
|
AlignConsecutiveMacros: Consecutive
|
||||||
AlignConsecutiveDeclarations: AcrossEmptyLines
|
AlignConsecutiveDeclarations: Consecutive
|
||||||
AlignConsecutiveAssignments: AcrossEmptyLinesAndComments
|
AlignConsecutiveAssignments: Consecutive
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
AfterEnum: false
|
AfterEnum: false
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
[submodule "SDK"]
|
[submodule "SDK"]
|
||||||
path = SDK
|
path = SDK
|
||||||
url = git@git.minori.work:Embedded_SDK/MCUXpresso_MIMXRT1052xxxxB.git
|
url = https://git.minori.work/Embedded_SDK/MCUXpresso_MIMXRT1052xxxxB.git
|
||||||
|
[submodule "lib/threadx"]
|
||||||
|
path = lib/threadx
|
||||||
|
url = https://github.com/azure-rtos/threadx.git
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
project(fire_rt1052_pro_template)
|
project(fire_rt1052_pro_azrtos_hello)
|
||||||
|
|
||||||
enable_language(CXX)
|
enable_language(CXX)
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
|
@ -95,6 +95,8 @@ set(TARGET_SOURCES
|
||||||
"board/dcd.c"
|
"board/dcd.c"
|
||||||
"board/peripherals.c"
|
"board/peripherals.c"
|
||||||
"board/pin_mux.c"
|
"board/pin_mux.c"
|
||||||
|
"src/app_entry.c"
|
||||||
|
"src/app_thr_hello.c"
|
||||||
"src/main.c"
|
"src/main.c"
|
||||||
"xip/fire_rt1052_pro_flexspi_nor_config.c"
|
"xip/fire_rt1052_pro_flexspi_nor_config.c"
|
||||||
)
|
)
|
||||||
|
@ -131,6 +133,7 @@ set(TARGET_C_INCLUDES
|
||||||
|
|
||||||
# Shared libraries linked with application
|
# Shared libraries linked with application
|
||||||
set(TARGET_LIBS
|
set(TARGET_LIBS
|
||||||
|
"threadx"
|
||||||
"c"
|
"c"
|
||||||
"m"
|
"m"
|
||||||
"nosys"
|
"nosys"
|
||||||
|
@ -159,6 +162,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-common -fno-builtin -f
|
||||||
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp")
|
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
||||||
|
|
||||||
|
set(THREADX_ARCH "cortex_m7" CACHE STRING "")
|
||||||
|
set(THREADX_TOOLCHAIN "gnu" CACHE STRING "")
|
||||||
|
set(TX_USER_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/tx_user.h" CACHE STRING "")
|
||||||
|
add_subdirectory(lib/threadx)
|
||||||
|
|
||||||
# Shared sources, includes and definitions
|
# Shared sources, includes and definitions
|
||||||
add_compile_definitions(${TARGET_C_DEFINES})
|
add_compile_definitions(${TARGET_C_DEFINES})
|
||||||
include_directories(${TARGET_C_INCLUDES})
|
include_directories(${TARGET_C_INCLUDES})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding= "UTF-8" ?>
|
<?xml version="1.0" encoding= "UTF-8" ?>
|
||||||
<configuration name="MIMXRT1052xxxxB" xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/mex_configuration_12 http://mcuxpresso.nxp.com/XSD/mex_configuration_12.xsd" uuid="ea584181-55b7-4bac-96ba-c53df188dbf3" version="12" xmlns="http://mcuxpresso.nxp.com/XSD/mex_configuration_12" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<configuration name="MIMXRT1052xxxxB" xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/mex_configuration_13 http://mcuxpresso.nxp.com/XSD/mex_configuration_13.xsd" uuid="ea584181-55b7-4bac-96ba-c53df188dbf3" version="13" xmlns="http://mcuxpresso.nxp.com/XSD/mex_configuration_13" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<common>
|
<common>
|
||||||
<processor>MIMXRT1052xxxxB</processor>
|
<processor>MIMXRT1052xxxxB</processor>
|
||||||
<package>MIMXRT1052DVL6B</package>
|
<package>MIMXRT1052DVL6B</package>
|
||||||
|
@ -17,13 +17,13 @@
|
||||||
<generate_registers_defines>false</generate_registers_defines>
|
<generate_registers_defines>false</generate_registers_defines>
|
||||||
</preferences>
|
</preferences>
|
||||||
<tools>
|
<tools>
|
||||||
<pins name="Pins" version="13.0" enabled="true" update_project_code="true">
|
<pins name="Pins" version="13.1" enabled="true" update_project_code="true">
|
||||||
<generated_project_files>
|
<generated_project_files>
|
||||||
<file path="board/pin_mux.c" update_enabled="true"/>
|
<file path="board/pin_mux.c" update_enabled="true"/>
|
||||||
<file path="board/pin_mux.h" update_enabled="true"/>
|
<file path="board/pin_mux.h" update_enabled="true"/>
|
||||||
</generated_project_files>
|
</generated_project_files>
|
||||||
<pins_profile>
|
<pins_profile>
|
||||||
<processor_version>13.0.1</processor_version>
|
<processor_version>13.0.2</processor_version>
|
||||||
<pin_labels>
|
<pin_labels>
|
||||||
<pin_label pin_num="C7" pin_signal="GPIO_EMC_41" label="LED_B" identifier="LED_R;LED_B"/>
|
<pin_label pin_num="C7" pin_signal="GPIO_EMC_41" label="LED_B" identifier="LED_R;LED_B"/>
|
||||||
<pin_label pin_num="B12" pin_signal="GPIO_B1_07" label="LED_G" identifier="LED_G"/>
|
<pin_label pin_num="B12" pin_signal="GPIO_B1_07" label="LED_G" identifier="LED_G"/>
|
||||||
|
@ -34,6 +34,9 @@
|
||||||
<pin_label pin_num="H10" pin_signal="GPIO_AD_B0_01" label="CSI_RST" identifier="CSI_RST"/>
|
<pin_label pin_num="H10" pin_signal="GPIO_AD_B0_01" label="CSI_RST" identifier="CSI_RST"/>
|
||||||
<pin_label pin_num="G11" pin_signal="GPIO_AD_B0_03" label="BUZZER" identifier="BUZZER"/>
|
<pin_label pin_num="G11" pin_signal="GPIO_AD_B0_03" label="BUZZER" identifier="BUZZER"/>
|
||||||
<pin_label pin_num="L6" pin_signal="WAKEUP" label="WAKEUP" identifier="WAKEUP"/>
|
<pin_label pin_num="L6" pin_signal="WAKEUP" label="WAKEUP" identifier="WAKEUP"/>
|
||||||
|
<pin_label pin_num="G13" pin_signal="GPIO_AD_B0_10" label="LED_B" identifier="LED_B"/>
|
||||||
|
<pin_label pin_num="H13" pin_signal="GPIO_AD_B1_08" label="LED_R" identifier="LED_R"/>
|
||||||
|
<pin_label pin_num="M13" pin_signal="GPIO_AD_B1_09" label="LED_G" identifier="LED_G"/>
|
||||||
</pin_labels>
|
</pin_labels>
|
||||||
<power_domains>
|
<power_domains>
|
||||||
<power_domain name="DCDC_IN" value="3.3"/>
|
<power_domain name="DCDC_IN" value="3.3"/>
|
||||||
|
@ -109,8 +112,8 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<pins>
|
<pins>
|
||||||
<pin peripheral="JTAG" signal="TMS" pin_num="E14" pin_signal="GPIO_AD_B0_06"/>
|
|
||||||
<pin peripheral="JTAG" signal="TCK" pin_num="F12" pin_signal="GPIO_AD_B0_07"/>
|
<pin peripheral="JTAG" signal="TCK" pin_num="F12" pin_signal="GPIO_AD_B0_07"/>
|
||||||
|
<pin peripheral="JTAG" signal="TMS" pin_num="E14" pin_signal="GPIO_AD_B0_06"/>
|
||||||
</pins>
|
</pins>
|
||||||
</function>
|
</function>
|
||||||
<function name="BOARD_InitFlexSPIPins">
|
<function name="BOARD_InitFlexSPIPins">
|
||||||
|
@ -712,6 +715,53 @@
|
||||||
<pin peripheral="SPDIF" signal="spdif_out" pin_num="L11" pin_signal="GPIO_AD_B1_02"/>
|
<pin peripheral="SPDIF" signal="spdif_out" pin_num="L11" pin_signal="GPIO_AD_B1_02"/>
|
||||||
</pins>
|
</pins>
|
||||||
</function>
|
</function>
|
||||||
|
<function name="BOARD_InitCLEDPins">
|
||||||
|
<description>Configures pin routing and optionally pin electrical features.</description>
|
||||||
|
<options>
|
||||||
|
<callFromInitBoot>true</callFromInitBoot>
|
||||||
|
<coreID>core0</coreID>
|
||||||
|
<enableClock>true</enableClock>
|
||||||
|
</options>
|
||||||
|
<dependencies>
|
||||||
|
<dependency resourceType="SWComponent" resourceId="platform.drivers.common" description="Pins initialization requires the COMMON Driver in the project." problem_level="2" source="Pins:BOARD_InitCLEDPins">
|
||||||
|
<feature name="enabled" evaluation="equal" configuration="core0">
|
||||||
|
<data>true</data>
|
||||||
|
</feature>
|
||||||
|
</dependency>
|
||||||
|
<dependency resourceType="SWComponent" resourceId="platform.drivers.iomuxc" description="Pins initialization requires the IOMUXC Driver in the project." problem_level="2" source="Pins:BOARD_InitCLEDPins">
|
||||||
|
<feature name="enabled" evaluation="equal" configuration="core0">
|
||||||
|
<data>true</data>
|
||||||
|
</feature>
|
||||||
|
</dependency>
|
||||||
|
<dependency resourceType="SWComponent" resourceId="platform.drivers.igpio" description="Pins initialization requires the IGPIO Driver in the project." problem_level="2" source="Pins:BOARD_InitCLEDPins">
|
||||||
|
<feature name="enabled" evaluation="equal" configuration="core0">
|
||||||
|
<data>true</data>
|
||||||
|
</feature>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<pins>
|
||||||
|
<pin peripheral="GPIO1" signal="gpio_io, 10" pin_num="G13" pin_signal="GPIO_AD_B0_10">
|
||||||
|
<pin_features>
|
||||||
|
<pin_feature name="direction" value="OUTPUT"/>
|
||||||
|
<pin_feature name="gpio_init_state" value="true"/>
|
||||||
|
<pin_feature name="open_drain" value="Enable"/>
|
||||||
|
<pin_feature name="slew_rate" value="Slow"/>
|
||||||
|
</pin_features>
|
||||||
|
</pin>
|
||||||
|
<pin peripheral="GPIO1" signal="gpio_io, 24" pin_num="H13" pin_signal="GPIO_AD_B1_08">
|
||||||
|
<pin_features>
|
||||||
|
<pin_feature name="direction" value="OUTPUT"/>
|
||||||
|
<pin_feature name="gpio_init_state" value="true"/>
|
||||||
|
</pin_features>
|
||||||
|
</pin>
|
||||||
|
<pin peripheral="GPIO1" signal="gpio_io, 25" pin_num="M13" pin_signal="GPIO_AD_B1_09">
|
||||||
|
<pin_features>
|
||||||
|
<pin_feature name="direction" value="OUTPUT"/>
|
||||||
|
<pin_feature name="gpio_init_state" value="true"/>
|
||||||
|
</pin_features>
|
||||||
|
</pin>
|
||||||
|
</pins>
|
||||||
|
</function>
|
||||||
</functions_list>
|
</functions_list>
|
||||||
</pins>
|
</pins>
|
||||||
<clocks name="Clocks" version="11.0" enabled="true" update_project_code="true">
|
<clocks name="Clocks" version="11.0" enabled="true" update_project_code="true">
|
||||||
|
@ -720,7 +770,7 @@
|
||||||
<file path="board/clock_config.h" update_enabled="true"/>
|
<file path="board/clock_config.h" update_enabled="true"/>
|
||||||
</generated_project_files>
|
</generated_project_files>
|
||||||
<clocks_profile>
|
<clocks_profile>
|
||||||
<processor_version>13.0.1</processor_version>
|
<processor_version>13.0.2</processor_version>
|
||||||
</clocks_profile>
|
</clocks_profile>
|
||||||
<clock_configurations>
|
<clock_configurations>
|
||||||
<clock_configuration name="Board_BootClockPLL600MHz" id_prefix="" prefix_user_defined="false">
|
<clock_configuration name="Board_BootClockPLL600MHz" id_prefix="" prefix_user_defined="false">
|
||||||
|
@ -984,7 +1034,7 @@
|
||||||
<file path="board/dcd.h" update_enabled="true"/>
|
<file path="board/dcd.h" update_enabled="true"/>
|
||||||
</generated_project_files>
|
</generated_project_files>
|
||||||
<dcdx_profile>
|
<dcdx_profile>
|
||||||
<processor_version>13.0.1</processor_version>
|
<processor_version>13.0.2</processor_version>
|
||||||
<output_format>c_array</output_format>
|
<output_format>c_array</output_format>
|
||||||
</dcdx_profile>
|
</dcdx_profile>
|
||||||
<dcdx_configurations>
|
<dcdx_configurations>
|
||||||
|
@ -1001,7 +1051,7 @@
|
||||||
<file path="board/peripherals.h" update_enabled="true"/>
|
<file path="board/peripherals.h" update_enabled="true"/>
|
||||||
</generated_project_files>
|
</generated_project_files>
|
||||||
<peripherals_profile>
|
<peripherals_profile>
|
||||||
<processor_version>13.0.1</processor_version>
|
<processor_version>13.0.2</processor_version>
|
||||||
</peripherals_profile>
|
</peripherals_profile>
|
||||||
<functional_groups>
|
<functional_groups>
|
||||||
<functional_group name="BOARD_InitPeripherals" uuid="19596643-a9d0-4000-b44d-6a0a05ec6830" called_from_default_init="true" id_prefix="" core="core0">
|
<functional_group name="BOARD_InitPeripherals" uuid="19596643-a9d0-4000-b44d-6a0a05ec6830" called_from_default_init="true" id_prefix="" core="core0">
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit c2668b7ca02d42d9e8638a8d92fdbf8656a54099
|
|
@ -19,7 +19,7 @@ product: Clocks v11.0
|
||||||
processor: MIMXRT1052xxxxB
|
processor: MIMXRT1052xxxxB
|
||||||
package_id: MIMXRT1052DVL6B
|
package_id: MIMXRT1052DVL6B
|
||||||
mcu_data: ksdk2_0
|
mcu_data: ksdk2_0
|
||||||
processor_version: 13.0.1
|
processor_version: 13.0.2
|
||||||
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
|
||||||
|
|
||||||
#include "clock_config.h"
|
#include "clock_config.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@ product: DCDx v3.0
|
||||||
processor: MIMXRT1052xxxxB
|
processor: MIMXRT1052xxxxB
|
||||||
package_id: MIMXRT1052DVL6B
|
package_id: MIMXRT1052DVL6B
|
||||||
mcu_data: ksdk2_0
|
mcu_data: ksdk2_0
|
||||||
processor_version: 13.0.1
|
processor_version: 13.0.2
|
||||||
output_format: c_array
|
output_format: c_array
|
||||||
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
|
||||||
/* COMMENTS BELOW ARE USED AS SETTINGS FOR DCD DATA */
|
/* COMMENTS BELOW ARE USED AS SETTINGS FOR DCD DATA */
|
||||||
|
|
|
@ -10,7 +10,7 @@ product: Peripherals v12.0
|
||||||
processor: MIMXRT1052xxxxB
|
processor: MIMXRT1052xxxxB
|
||||||
package_id: MIMXRT1052DVL6B
|
package_id: MIMXRT1052DVL6B
|
||||||
mcu_data: ksdk2_0
|
mcu_data: ksdk2_0
|
||||||
processor_version: 13.0.1
|
processor_version: 13.0.2
|
||||||
functionalGroups:
|
functionalGroups:
|
||||||
- name: BOARD_InitPeripherals
|
- name: BOARD_InitPeripherals
|
||||||
UUID: 19596643-a9d0-4000-b44d-6a0a05ec6830
|
UUID: 19596643-a9d0-4000-b44d-6a0a05ec6830
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
/*
|
/*
|
||||||
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
||||||
!!GlobalInfo
|
!!GlobalInfo
|
||||||
product: Pins v13.0
|
product: Pins v13.1
|
||||||
processor: MIMXRT1052xxxxB
|
processor: MIMXRT1052xxxxB
|
||||||
package_id: MIMXRT1052DVL6B
|
package_id: MIMXRT1052DVL6B
|
||||||
mcu_data: ksdk2_0
|
mcu_data: ksdk2_0
|
||||||
processor_version: 13.0.1
|
processor_version: 13.0.2
|
||||||
pin_labels:
|
pin_labels:
|
||||||
- {pin_num: C7, pin_signal: GPIO_EMC_41, label: LED_B, identifier: LED_R;LED_B}
|
- {pin_num: C7, pin_signal: GPIO_EMC_41, label: LED_B, identifier: LED_R;LED_B}
|
||||||
- {pin_num: B12, pin_signal: GPIO_B1_07, label: LED_G, identifier: LED_G}
|
- {pin_num: B12, pin_signal: GPIO_B1_07, label: LED_G, identifier: LED_G}
|
||||||
|
@ -21,6 +21,9 @@ pin_labels:
|
||||||
- {pin_num: H10, pin_signal: GPIO_AD_B0_01, label: CSI_RST, identifier: CSI_RST}
|
- {pin_num: H10, pin_signal: GPIO_AD_B0_01, label: CSI_RST, identifier: CSI_RST}
|
||||||
- {pin_num: G11, pin_signal: GPIO_AD_B0_03, label: BUZZER, identifier: BUZZER}
|
- {pin_num: G11, pin_signal: GPIO_AD_B0_03, label: BUZZER, identifier: BUZZER}
|
||||||
- {pin_num: L6, pin_signal: WAKEUP, label: WAKEUP, identifier: WAKEUP}
|
- {pin_num: L6, pin_signal: WAKEUP, label: WAKEUP, identifier: WAKEUP}
|
||||||
|
- {pin_num: G13, pin_signal: GPIO_AD_B0_10, label: LED_B, identifier: LED_B}
|
||||||
|
- {pin_num: H13, pin_signal: GPIO_AD_B1_08, label: LED_R, identifier: LED_R}
|
||||||
|
- {pin_num: M13, pin_signal: GPIO_AD_B1_09, label: LED_G, identifier: LED_G}
|
||||||
power_domains: {DCDC_IN: '3.3', DCDC_IN_Q: '3.3', DCDC_LP: '1.25', DCDC_PSWITCH: '3.3', DCDC_SENSE: '1.25', NVCC_EMC: '3.3', NVCC_GPIO: '3.3', NVCC_SD0: '3.3', NVCC_SD1: '3.3',
|
power_domains: {DCDC_IN: '3.3', DCDC_IN_Q: '3.3', DCDC_LP: '1.25', DCDC_PSWITCH: '3.3', DCDC_SENSE: '1.25', NVCC_EMC: '3.3', NVCC_GPIO: '3.3', NVCC_SD0: '3.3', NVCC_SD1: '3.3',
|
||||||
VDDA_ADC_3P3: '3.3', VDD_HIGH_CAP: '1.1', VDD_HIGH_IN: '3.3', VDD_SNVS_CAP: '1.1', VDD_SNVS_IN: '3.3', VDD_SOC_IN: '1.25', VDD_USB_CAP: '2.5'}
|
VDDA_ADC_3P3: '3.3', VDD_HIGH_CAP: '1.1', VDD_HIGH_IN: '3.3', VDD_SNVS_CAP: '1.1', VDD_SNVS_IN: '3.3', VDD_SOC_IN: '1.25', VDD_USB_CAP: '2.5'}
|
||||||
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
||||||
|
@ -41,6 +44,7 @@ void BOARD_InitBootPins(void) {
|
||||||
BOARD_InitUARTDbgPins();
|
BOARD_InitUARTDbgPins();
|
||||||
BOARD_InitSWDPins();
|
BOARD_InitSWDPins();
|
||||||
BOARD_InitFlexSPIPins();
|
BOARD_InitFlexSPIPins();
|
||||||
|
BOARD_InitCLEDPins();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -80,8 +84,8 @@ void BOARD_InitUARTDbgPins(void) {
|
||||||
BOARD_InitSWDPins:
|
BOARD_InitSWDPins:
|
||||||
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
|
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
|
||||||
- pin_list:
|
- pin_list:
|
||||||
- {pin_num: E14, peripheral: JTAG, signal: TMS, pin_signal: GPIO_AD_B0_06}
|
|
||||||
- {pin_num: F12, peripheral: JTAG, signal: TCK, pin_signal: GPIO_AD_B0_07}
|
- {pin_num: F12, peripheral: JTAG, signal: TCK, pin_signal: GPIO_AD_B0_07}
|
||||||
|
- {pin_num: E14, peripheral: JTAG, signal: TMS, pin_signal: GPIO_AD_B0_06}
|
||||||
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -808,6 +812,60 @@ void BOARD_InitSPDIFPins(void) {
|
||||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_03_SPDIF_IN, 0U);
|
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_03_SPDIF_IN, 0U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
||||||
|
BOARD_InitCLEDPins:
|
||||||
|
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
|
||||||
|
- pin_list:
|
||||||
|
- {pin_num: G13, peripheral: GPIO1, signal: 'gpio_io, 10', pin_signal: GPIO_AD_B0_10, direction: OUTPUT, gpio_init_state: 'true', open_drain: Enable, slew_rate: Slow}
|
||||||
|
- {pin_num: H13, peripheral: GPIO1, signal: 'gpio_io, 24', pin_signal: GPIO_AD_B1_08, direction: OUTPUT, gpio_init_state: 'true'}
|
||||||
|
- {pin_num: M13, peripheral: GPIO1, signal: 'gpio_io, 25', pin_signal: GPIO_AD_B1_09, direction: OUTPUT, gpio_init_state: 'true'}
|
||||||
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* FUNCTION ************************************************************************************************************
|
||||||
|
*
|
||||||
|
* Function Name : BOARD_InitCLEDPins
|
||||||
|
* Description : Configures pin routing and optionally pin electrical features.
|
||||||
|
*
|
||||||
|
* END ****************************************************************************************************************/
|
||||||
|
void BOARD_InitCLEDPins(void) {
|
||||||
|
CLOCK_EnableClock(kCLOCK_Iomuxc);
|
||||||
|
|
||||||
|
/* GPIO configuration of LED_B on GPIO_AD_B0_10 (pin G13) */
|
||||||
|
gpio_pin_config_t LED_B_config = {
|
||||||
|
.direction = kGPIO_DigitalOutput,
|
||||||
|
.outputLogic = 1U,
|
||||||
|
.interruptMode = kGPIO_NoIntmode
|
||||||
|
};
|
||||||
|
/* Initialize GPIO functionality on GPIO_AD_B0_10 (pin G13) */
|
||||||
|
GPIO_PinInit(GPIO1, 10U, &LED_B_config);
|
||||||
|
|
||||||
|
/* GPIO configuration of LED_R on GPIO_AD_B1_08 (pin H13) */
|
||||||
|
gpio_pin_config_t LED_R_config = {
|
||||||
|
.direction = kGPIO_DigitalOutput,
|
||||||
|
.outputLogic = 1U,
|
||||||
|
.interruptMode = kGPIO_NoIntmode
|
||||||
|
};
|
||||||
|
/* Initialize GPIO functionality on GPIO_AD_B1_08 (pin H13) */
|
||||||
|
GPIO_PinInit(GPIO1, 24U, &LED_R_config);
|
||||||
|
|
||||||
|
/* GPIO configuration of LED_G on GPIO_AD_B1_09 (pin M13) */
|
||||||
|
gpio_pin_config_t LED_G_config = {
|
||||||
|
.direction = kGPIO_DigitalOutput,
|
||||||
|
.outputLogic = 1U,
|
||||||
|
.interruptMode = kGPIO_NoIntmode
|
||||||
|
};
|
||||||
|
/* Initialize GPIO functionality on GPIO_AD_B1_09 (pin M13) */
|
||||||
|
GPIO_PinInit(GPIO1, 25U, &LED_G_config);
|
||||||
|
|
||||||
|
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, 0U);
|
||||||
|
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_08_GPIO1_IO24, 0U);
|
||||||
|
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_09_GPIO1_IO25, 0U);
|
||||||
|
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, 0x98B0U);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************************************************************
|
/***********************************************************************************************************************
|
||||||
* EOF
|
* EOF
|
||||||
**********************************************************************************************************************/
|
**********************************************************************************************************************/
|
||||||
|
|
|
@ -114,6 +114,25 @@ void BOARD_InitSEMCPins(void);
|
||||||
*/
|
*/
|
||||||
void BOARD_InitLCDPins(void);
|
void BOARD_InitLCDPins(void);
|
||||||
|
|
||||||
|
/* GPIO_AD_B1_09 (coord M13), LED_G */
|
||||||
|
/* Routed pin properties */
|
||||||
|
#define BOARD_INITCODECPINS_LED_G_PERIPHERAL SAI1 /*!< Peripheral name */
|
||||||
|
#define BOARD_INITCODECPINS_LED_G_SIGNAL sai_mclk /*!< Signal name */
|
||||||
|
|
||||||
|
/* GPIO_AD_B1_08 (coord H13), LED_R */
|
||||||
|
/* Routed pin properties */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_PERIPHERAL GPIO1 /*!< Peripheral name */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_SIGNAL gpio_io /*!< Signal name */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_CHANNEL 24U /*!< Signal channel */
|
||||||
|
|
||||||
|
/* Symbols to be used with GPIO driver */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_GPIO GPIO1 /*!< GPIO peripheral base pointer */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_GPIO_PIN 24U /*!< GPIO pin number */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_GPIO_PIN_MASK (1U << 24U) /*!< GPIO pin mask */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_PORT GPIO1 /*!< PORT peripheral base pointer */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_PIN 24U /*!< PORT pin number */
|
||||||
|
#define BOARD_INITCODECPINS_LED_R_PIN_MASK (1U << 24U) /*!< PORT pin mask */
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Configures pin routing and optionally pin electrical features.
|
* @brief Configures pin routing and optionally pin electrical features.
|
||||||
|
@ -121,6 +140,18 @@ void BOARD_InitLCDPins(void);
|
||||||
*/
|
*/
|
||||||
void BOARD_InitCodecPins(void);
|
void BOARD_InitCodecPins(void);
|
||||||
|
|
||||||
|
/* GPIO_AD_B1_09 (coord M13), LED_G */
|
||||||
|
/* Routed pin properties */
|
||||||
|
#define BOARD_INITCSIPINS_LED_G_PERIPHERAL CSI /*!< Peripheral name */
|
||||||
|
#define BOARD_INITCSIPINS_LED_G_SIGNAL csi_data /*!< Signal name */
|
||||||
|
#define BOARD_INITCSIPINS_LED_G_CHANNEL 8U /*!< Signal channel */
|
||||||
|
|
||||||
|
/* GPIO_AD_B1_08 (coord H13), LED_R */
|
||||||
|
/* Routed pin properties */
|
||||||
|
#define BOARD_INITCSIPINS_LED_R_PERIPHERAL CSI /*!< Peripheral name */
|
||||||
|
#define BOARD_INITCSIPINS_LED_R_SIGNAL csi_data /*!< Signal name */
|
||||||
|
#define BOARD_INITCSIPINS_LED_R_CHANNEL 9U /*!< Signal channel */
|
||||||
|
|
||||||
/* GPIO_AD_B0_00 (coord M14), CSI_ */
|
/* GPIO_AD_B0_00 (coord M14), CSI_ */
|
||||||
/* Routed pin properties */
|
/* Routed pin properties */
|
||||||
#define BOARD_INITCSIPINS_CSI_PDN_PERIPHERAL GPIO1 /*!< Peripheral name */
|
#define BOARD_INITCSIPINS_CSI_PDN_PERIPHERAL GPIO1 /*!< Peripheral name */
|
||||||
|
@ -232,6 +263,55 @@ void BOARD_InitCAN2Pins(void);
|
||||||
*/
|
*/
|
||||||
void BOARD_InitSPDIFPins(void);
|
void BOARD_InitSPDIFPins(void);
|
||||||
|
|
||||||
|
/* GPIO_AD_B0_10 (coord G13), LED_B */
|
||||||
|
/* Routed pin properties */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_PERIPHERAL GPIO1 /*!< Peripheral name */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_SIGNAL gpio_io /*!< Signal name */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_CHANNEL 10U /*!< Signal channel */
|
||||||
|
|
||||||
|
/* Symbols to be used with GPIO driver */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_GPIO GPIO1 /*!< GPIO peripheral base pointer */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_GPIO_PIN 10U /*!< GPIO pin number */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_GPIO_PIN_MASK (1U << 10U) /*!< GPIO pin mask */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_PORT GPIO1 /*!< PORT peripheral base pointer */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_PIN 10U /*!< PORT pin number */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_B_PIN_MASK (1U << 10U) /*!< PORT pin mask */
|
||||||
|
|
||||||
|
/* GPIO_AD_B1_08 (coord H13), LED_R */
|
||||||
|
/* Routed pin properties */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_PERIPHERAL GPIO1 /*!< Peripheral name */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_SIGNAL gpio_io /*!< Signal name */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_CHANNEL 24U /*!< Signal channel */
|
||||||
|
|
||||||
|
/* Symbols to be used with GPIO driver */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_GPIO GPIO1 /*!< GPIO peripheral base pointer */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_GPIO_PIN 24U /*!< GPIO pin number */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_GPIO_PIN_MASK (1U << 24U) /*!< GPIO pin mask */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_PORT GPIO1 /*!< PORT peripheral base pointer */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_PIN 24U /*!< PORT pin number */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_R_PIN_MASK (1U << 24U) /*!< PORT pin mask */
|
||||||
|
|
||||||
|
/* GPIO_AD_B1_09 (coord M13), LED_G */
|
||||||
|
/* Routed pin properties */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_PERIPHERAL GPIO1 /*!< Peripheral name */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_SIGNAL gpio_io /*!< Signal name */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_CHANNEL 25U /*!< Signal channel */
|
||||||
|
|
||||||
|
/* Symbols to be used with GPIO driver */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_GPIO GPIO1 /*!< GPIO peripheral base pointer */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_GPIO_PIN 25U /*!< GPIO pin number */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_GPIO_PIN_MASK (1U << 25U) /*!< GPIO pin mask */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_PORT GPIO1 /*!< PORT peripheral base pointer */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_PIN 25U /*!< PORT pin number */
|
||||||
|
#define BOARD_INITCLEDPINS_LED_G_PIN_MASK (1U << 25U) /*!< PORT pin mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Configures pin routing and optionally pin electrical features.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void BOARD_InitCLEDPins(void);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef APP_THR_H
|
||||||
|
#define APP_THR_H
|
||||||
|
|
||||||
|
void hello_task(ULONG thread_input);
|
||||||
|
|
||||||
|
#endif // APP_THR_H
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef TX_USER_H
|
||||||
|
#define TX_USER_H
|
||||||
|
|
||||||
|
#define TX_TIMER_TICKS_PER_SECOND 1000
|
||||||
|
|
||||||
|
#endif // TX_USER_H
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 2aa19f3de0b6cf09bb9dca78c8a53fe337b8f0f7
|
|
@ -0,0 +1,45 @@
|
||||||
|
/* SDK drivers */
|
||||||
|
#include "fsl_common.h"
|
||||||
|
|
||||||
|
/* ThreadX */
|
||||||
|
#include "tx_api.h"
|
||||||
|
|
||||||
|
/* App */
|
||||||
|
#include "app_thr.h"
|
||||||
|
|
||||||
|
extern void *__HeapLimit;
|
||||||
|
extern void *_tx_initialize_unused_memory;
|
||||||
|
|
||||||
|
void _tx_timer_interrupt(void);
|
||||||
|
|
||||||
|
static TX_THREAD hello_task_handle;
|
||||||
|
|
||||||
|
void tx_application_define(void *first_unused_memory) {
|
||||||
|
tx_thread_create(&hello_task_handle, "T_HE", hello_task, 0x00, first_unused_memory, 1024, 3, 3, TX_NO_TIME_SLICE,
|
||||||
|
TX_AUTO_START);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _tx_initialize_low_level(void) {
|
||||||
|
DisableGlobalIRQ();
|
||||||
|
|
||||||
|
_tx_initialize_unused_memory = (VOID *)&__HeapLimit;
|
||||||
|
|
||||||
|
/* enable CPU cycle counter */
|
||||||
|
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
|
||||||
|
|
||||||
|
SysTick_Config(SystemCoreClock / TX_TIMER_TICKS_PER_SECOND);
|
||||||
|
|
||||||
|
NVIC_SetPriority(MemoryManagement_IRQn, 0);
|
||||||
|
NVIC_SetPriority(BusFault_IRQn, 0);
|
||||||
|
NVIC_SetPriority(UsageFault_IRQn, 0);
|
||||||
|
|
||||||
|
NVIC_SetPriority(SVCall_IRQn, 0x0ff);
|
||||||
|
|
||||||
|
NVIC_SetPriority(DebugMonitor_IRQn, 0);
|
||||||
|
NVIC_SetPriority(PendSV_IRQn, 0x0ff);
|
||||||
|
NVIC_SetPriority(SysTick_IRQn, 0x40);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID SysTick_Handler(VOID) {
|
||||||
|
_tx_timer_interrupt();
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
/* Board */
|
||||||
|
#include "pin_mux.h"
|
||||||
|
|
||||||
|
/* SDK drivers */
|
||||||
|
#include "fsl_common.h"
|
||||||
|
#include "fsl_gpio.h"
|
||||||
|
|
||||||
|
/* ThreadX */
|
||||||
|
#include "tx_api.h"
|
||||||
|
|
||||||
|
/* App */
|
||||||
|
#include "app_thr.h"
|
||||||
|
|
||||||
|
void hello_task(ULONG thread_input) {
|
||||||
|
for (;;) {
|
||||||
|
GPIO_PinWrite(BOARD_INITCLEDPINS_LED_R_GPIO, BOARD_INITCLEDPINS_LED_R_GPIO_PIN, 1);
|
||||||
|
tx_thread_sleep(750);
|
||||||
|
GPIO_PinWrite(BOARD_INITCLEDPINS_LED_R_GPIO, BOARD_INITCLEDPINS_LED_R_GPIO_PIN, 0);
|
||||||
|
tx_thread_sleep(250);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,9 @@
|
||||||
#include "peripherals.h"
|
#include "peripherals.h"
|
||||||
#include "pin_mux.h"
|
#include "pin_mux.h"
|
||||||
|
|
||||||
|
/* ThreadX */
|
||||||
|
#include "tx_api.h"
|
||||||
|
|
||||||
/* Debug console */
|
/* Debug console */
|
||||||
#include "fsl_debug_console.h"
|
#include "fsl_debug_console.h"
|
||||||
|
|
||||||
|
@ -16,7 +19,7 @@ int main(void) {
|
||||||
|
|
||||||
CLOCK_SetMode(kCLOCK_ModeRun);
|
CLOCK_SetMode(kCLOCK_ModeRun);
|
||||||
|
|
||||||
PRINTF("CPU frequency: %d\r\n", CLOCK_GetCoreSysClkFreq());
|
tx_kernel_enter();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
__WFI();
|
__WFI();
|
||||||
|
|
Loading…
Reference in New Issue