Kinetisソフトウェア開発キット・ナレッジベース

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Kinetis Software Development Kit Knowledge Base

ラベル
  • General 62

ディスカッション

ソート順:
Hello community,   This document is the continuation of the document Line scan camera with KSDK [ADC + PIT + GPIO] which shows the ease of use of the peripheral drivers from Kinetis SDK applied to the Freescale Cup smart car. This time I bring to you a document which explains how to control the speed in DC motors and the position in servomotors with KSDK step-by-step. This document is intended to be an example for the TPM and the GPIO peripheral drivers usage.   The required material to run this project is: A Servomotor (the project supports up to two servomotors, one servomotor is included in the smart car kit). Two DC motors (included in the smart car kit). FRDM-KL25Z based on the Kinetis Microcontroller KL25Z. FRDM-TFC shield. Mini-USB cable.   This material can be bought in The Freescale Cup Intelligent Car Development.         The document Create a new KSDK 1.2.0 project in KDS 3.0.0 explains how to create a new KSDK project for the KL25Z MCU. The result of this document is the project BM-KSDK-FRDM_KL25Z. The document Controlling speed in DC motors and position in servomotors with the FRDM-KL25Z and the Kinetis SDK [FTM + GPIO] explains how to implement an application to control the motors. The result of this document is the project BM-KSDK-FRDM_KL25Z_LINE_SCAN_CAMERA-SERVO-DC_MOTORS.   If you are interested in participate in the Freescale Cup you could take a look into the groups University Programs, The Freescale Cup Technical Reports TFC - Mexico, TFC - Brazil, TFC - China, TFC - Malaysia, TFC - Japan, TFC - North America, TFC - India, TFC - Taiwan, The Freescale Cup EMEA.   Best regards, Earl Orlando Ramírez-Sánchez Technical Support Engineer Freescale Semiconductor
記事全体を表示
Hello dear community:   The attached document is an introductory guide to the Clock configuration system and Power manager system in KSDK v1.3 and its configuration using Processor Expert.   Some topics covered:   - KSDK Clock Manager system- Clock manager notification framework - Clock switch callbacks - KSDK Power Manager system - Power manager notification framework - Power mode switch callbacks - Creating and managing clock/power configurations with Processor Expert. - Managing custom clock/power callbacks with Processor Expert.   There is also an example project attached created for the FRDM-KL27Z board, but it can be taken as reference to use a different evaluation board or custom board. This project was developed by colleague Adrian Sanchez Cano.   I hope you find it useful. In case of any doubts please do not hesitate to ask.   Regards! Jorge Gonzalez
記事全体を表示
Hello community,   This document is the continuation of the documents Line scan camera with KSDK [ADC + PIT + GPIO] and Controlling speed in DC motors and position in servomotors with KSDK [FTM + GPIO] which show the ease of use of the peripheral drivers from Kinetis SDK applied to the Freescale Cup smart car. This time I bring to you a document which explains an easy way to detect the track's line from the data acquired with the linear camera.   The required material to run this project is: A Servomotor (the project supports up to two servomotors, one servomotor is included in the smart car kit). Two DC motors (included in the smart car kit). Line scan camera (the project supports up to two cameras). FRDM-KL25Z based on the Kinetis Microcontroller KL25Z. FRDM-TFC shield. Mini-USB cable.   This material can be bought in The Freescale Cup Intelligent Car Development.         If you are interested in participate in the Freescale Cup you could take a look into the groups University Programs, The Freescale Cup Technical Reports TFC - Mexico, TFC - Brazil, TFC - China, TFC - Malaysia, TFC - Japan, TFC - North America, TFC - India, TFC - Taiwan, The Freescale Cup EMEA.   Best regards, Earl Orlando Ramírez-Sánchez Technical Support Engineer Freescale Semiconductor
記事全体を表示
At the moment the best way to create a new KSDK example project is copying one of the existing projects in the /demos folder and renaming all the files and text to the new name. I've created a simple script that does all the work for you.   To run, just place the .exe or Perl script in the C:\Freescale\KSDK_1.0.0\demos folder and run. By default it'll copy the "hello_world" project to a new directory, and change all the "hello_world" text and files names to your new project name. Pretty straight forward, but much easier and less prone to error than doing it by hand. I've attached both the Perl source and a .exe created from that perl script. There is a command line option to specify the project to be copied, but by default it uses the hello_world one.   Hope you find it useful!
記事全体を表示
When you need to create copy/clone of i.g. web_hvac example for FreeRTOS as standalone project, you can face this issue. It is impossible to work with the copy. Why? There is missing folder for RTOS and LIB.   ISSUE: You start to clone example There is missing folder for RTOS Also missing library ksdk_freertos_lib which is needed for the example Impossible to compile the project, because folder mentioned above are missing in the project WORKAROUND: Just add the folder rtos from C:\Freescale\KSDK_1.3.0 The same for the library, you add to the folder from C:\Freescale\KSDK_1.3.0\lib Import .wsd file Wsd file was successfully imported, library is included Build successful finished   I hope this helps you. Iva
記事全体を表示
This video shall guide you on how to build and run the demo applications provided by Kinetis SDK.   Overview: Classes of software examples Importing and building library file project Importing, building and running a demo application   Software/Tools used: Kinetis Design Studio V3.0.0 Kinetis SDK V1.2.0 FRDM-K64F Board   Related Documents: Getting Started with Kinetis SDK v.1.2 - http://cache.freescale.com/files/soft_dev_tools/doc/support_info/KSDK12GSUG.pdf Kinetis SDK v.1.2 Demo Applications User’s Guide - http://cache.freescale.com/files/soft_dev_tools/doc/support_info/KSDK12DEMOUG.pdf Kinetis SDK FAQ - https://community.freescale.com/docs/DOC-102926   Related videos: Installation of KDS and Kinetis SDK - https://community.freescale.com/videos/3281 Installation of OpenSDA Firmware on Freedom Board - https://community.freescale.com/videos/3282 Debugging with Kinetis Design Studio - https://community.freescale.com/videos/3283 Using Processor Expert in KDS - https://community.freescale.com/videos/3297 KSDK GPIO driver with Processor Expert - https://community.freescale.com/videos/3195
記事全体を表示
This example project shows how to use CMSIS DSP functions to implement a digital filter. The project is based on Kinetis KV31F512.   It first generates a mixed signal which is composed by two sine waves.  Then it uses PDB to trigger DAC every 200 microsecond and output the signal through DAC, so that the mixed signal can be displaying on oscilloscope.   With QEDesign tool, a lowpass filter is designed, the filter coefficients are used directly to initialize the FIR function supplied by CMSIS DSP library. This example calls the FIR functions in CMSIS DSP lib, and the filtered signal is output though DAC module.
記事全体を表示
What is needed: SW: KDS 3.2 KSDK 2.0 Hercules (Visual Studio 2015)   HW: FRDM-K64F Ethernet Cable   Install KSDK 2.0 Be sure, that you have downloaded correct package KSDK 2.0 for FRDM-K64F, for all procedure please follow instructions mentioned at How to: install KSDK 2.0   Install KDS 3.2 Be sure, that you will work with the newest Kinetis Design Studio v.3.2, please see New Kinetis Design Studio v3.2.0 available for more details.   Import demo example For start with this example we will build on existing demo project, located under C:\Freescale\<ksdk2.0_package>\boards\frdmk64f\demo_apps\lwip\lwip_tcpecho\freertos\kds Please, import this example according to the procedure described at How to: import example in KSDK   Start with programming Let´s start with programming example for LED RGB controlling via ethernet   Checking and parsing incoming packets This packet is divided into header and data. The header represents first two bytes and the remaining three bytes are occupied by data. The zero byte is 0xFF and the first byte must be 0x00. The second byte represents red color, the third byte green color and the last fourth byte presents blue color. lwip_tcpecho_freertos.c Server is listening on port 7 and waiting for a connection from the client. If the client sends 5B, it find out according to header whether it is correct 5B. If so, each RGB parts will be parsed individually and set the LED accordingly.       while (1)     {         /* Grab new connection. */         err = netconn_accept(conn, &newconn);         /* Process the new connection. */         if (err == ERR_OK)         {             struct netbuf *buf;             u8_t *data;             u16_t len;               while ((err = netconn_recv(newconn, &buf)) == ERR_OK)             {                 do                 {                     netbuf_data(buf, &data, &len);                     if(len==5){                         if(data[0]==0xFF && data[1]==0x00){                             if(data[2]>0){                                 LED_RED_ON();                             }else {                                 LED_RED_OFF();                             }                             if(data[3]>0){                                 LED_GREEN_ON();                             }else {                                 LED_GREEN_OFF();                             }                             if(data[4]>0){                                 LED_BLUE_ON();                             }else {                                 LED_BLUE_OFF();                             }                             //err = netconn_write(newconn, "ok", 2, NETCONN_COPY);                         }                     }                 } while (netbuf_next(buf) >= 0);                 netbuf_delete(buf);             }             /* Close connection and discard connection identifier. */             netconn_close(newconn);             netconn_delete(newconn);         }     }   Initializing LEDs   It is needed to set all LEDs in pin_mux.c in BOARD_InitPins() function and initialize in lwip_tcpecho_freertos.c in main() function.   pin_mux.c Go to BOARD_InitPins() and at the end of the function add these lines: Copy and paste to your project     CLOCK_EnableClock(kCLOCK_PortB);     CLOCK_EnableClock(kCLOCK_PortE);     PORT_SetPinMux(PORTB, 21U, kPORT_MuxAsGpio);     PORT_SetPinMux(PORTB, 22U, kPORT_MuxAsGpio);     PORT_SetPinMux(PORTE, 26U, kPORT_MuxAsGpio);   lwip_tcpecho_freertos.c Go to main() and initialize LEDs Copy and paste to your project LED_RED_INIT(LOGIC_LED_OFF); LED_GREEN_INIT(LOGIC_LED_OFF); LED_BLUE_INIT(LOGIC_LED_OFF); Set up connection on PC site Set PC on 192.168.1.100   Controlling the application Hercules For test connection you can use Hercules. After testing don´t forget disconnect Hercules, server can handle only one TCP connection. IP Address of the board is set on 192.168.1.102 It works - the board is green lighting:   Visualization in Visual Studio 2015 For better controlling we will create application in Visual Studio 2015. Start with new project and create new form according this:   And set functionality for all items. Client connects to the IP Address on port 7 and sends our packet according selected colour. For red color are data set on { 0xFF, 0x00, 1, 0, 0 };, for yellow { 0xFF, 0x00, 1, 1, 0 }; etc.   Form1.cs public partial class Form1 : Form     {         Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);          public Form1()         {             InitializeComponent();                      }          private void button1_Click(object sender, EventArgs e)         {             try              {                 s.Connect(IPAddress.Parse(textBox1.Text), 7);                 byte[] data = { 0xFF, 0x00, 0, 0, 0 };                 groupBox1.Enabled = true;                 button1.Enabled = false;                 s.Send(data);                  textBox1.Enabled = false;             }             catch              {                 MessageBox.Show("Connection failed");             }         }          private void button_red_Click(object sender, EventArgs e)         {             if (s.Connected) {                 byte[] data = { 0xFF, 0x00, 1, 0, 0 };                 s.Send(data);             }         }          private void button_green_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 1, 0 };                 s.Send(data);             }         }          private void button_blue_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 0, 1 };                 s.Send(data);             }         }          private void button_black_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 0, 0 };                 s.Send(data);             }         }          private void button_white_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 1, 1, 1 };                 s.Send(data);             }         }          private void button_cyan_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 1, 1 };                 s.Send(data);             }         }          private void button_magenta_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 1, 0, 1 };                 s.Send(data);             }         }          private void button_yellow_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 1, 1, 0 };                 s.Send(data);             }         }     }     Enjoy! 🙂   Iva
記事全体を表示
This solution is just for you, who does not enjoy finding documentation for KSDK does not enjoy many opened windows (all in one) often ask where is the documentation for KSDK like an overview will appreciate embedded help   For detailed information please see KSDK 1.3.0 Documents Plugin for KDS 3.0.0   I hope you will really invite this tool. Iva
記事全体を表示
There was a macro definition issue in the flexcan driver of ksdk 2.0, the macros of RX_FIFO_STD_MASK_TYPE_B/C were defined based on maco FLEXCAN_ID_STD(id), for example: #define FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_HIGH(id, rtr, ide) \ (((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \ (FLEXCAN_ID_STD(id) << 16)) /**< Standard Rx FIFO Mask helper macro Type B upper part helper macro. */ but FLEXCAN_ID_STD(id) is defined for flexCAN Message Buffer structure, so FLEXCAN_ID_STD(id)  is a value of "id" left-shifted by 18,  according to the spec. while for RX FIFO ID table structure, the spec of Type B/C is different. so we should use the value of id directly to define the type B and type C Rx Frame Identifier. For example, #define FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_HIGH(id, rtr, ide) \ (((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \ ((id & 0x7FF) << 19)) /**< Standard Rx FIFO Mask helper macro Type B upper part helper macro. */   This patch doesn't affect FlexCAN operation related with message buffers , neither with RX FIFO A type ID table.   Please kindly refer to the attachment for details.   Sorry for the inconvenience that has caused.   -Kan
記事全体を表示
This patch adds Segment LCD (SLCD) examples for the Kinetis Tower boards with the TWRPI-SLCD module.  It reuses the SLCD driver included in the "Kinetis SDK 1.2.0 Standalone for KL33Z for the FRDM-KL43Z", and ports the example to boards using the TWRPI-SLCD module.    The patch was written for KSDK v1.2.0, found at www.freescale.com/KSDK.  To install the patch, unzip to the KSDK installation directory, by default it is C:\Freescale\KSDK_1.2.0.  Only the Debug Build Configurations in the libraries and example applications were updated for these examples.  The Release Build Configurations will need to be updated before using.  The boards supported with these examples are:   TWR-KL46Z48M   TWR-KL43Z48M   TWR-KL46Z48M board example is provided with a project for Kinetis Development Studio (KDS) toolchain, and tested with KDS v3.0.0.  The path for this example is at  \KSDK_1.2.0\examples\twrkl46z48m\demo_apps\slcd_low_power_demo\kds.  The example also includes the KDS .WSD working set file.  When this is imported to KDS, it imports both the platform library and example application.  The example is written to display time on the TWRPI-SLCD, and will display mm:ss.   TWR-KL43Z48M board example is provided with a project for Kinetis Development Studio (KDS) toolchain, and tested with KDS v3.0.0.  The path for this example is at \KSDK_1.2.0\examples\twrkl43z48m\demo_apps\slcd_low_power_demo\kds.  The example also includes the KDS .WSD working set file.  When this is imported to KDS, it imports both the platform library and example application.  The example is written to display time on the TWRPI-SLCD, and will display mm:ss.
記事全体を表示
So far the composite msd_cdc demo from ksdk 1.3 just supports ram disk application, to have the SD card support just as the dev_msd demo, you have to go through the following steps: Add platform/composite/src/sdcard/fsl_sdhc_card.c and platform\drivers\src\sdhc\fsl_sdhc_irq.c to the project. Add project including path: platform\composite\inc and platform\drivers\inc. Change usb\example\device\composite\msd_cdc\disk.c as attached file      Change usb\example\device\composite\msd_cdc\disk.h as attached file      Change usb\example\device\composite\msd_cdc\hardware_init.c as attached file. Compile the demo and let it go, the PC would recognize the MSD and CDC device,  but might need you install the CDC driver, use the one from the folder of "C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\demo_apps\usb\device\cdc\virtual_com\inf". With SD card inserted , you may see the removable disk, and format the disk just like below: Copy a ~50M file to this disk eject the disk after done, and then pull and plug the device again, you may verify the copied file with fc.exe command This solution has been tested on TWR-K60D100M with TWR-SER, both bm and mqx examples are verified ok, please kindly refer to the attached files for more details.
記事全体を表示
Problem: Unknown error in Task error code column (in Task List view from MQX TAD) is displayed when debugging MQX project in IAR with KSDK.   Cause: This error means that TAD cannot find mqx.tad file with messages for error codes. In this case code 0x0 means MQX_OK, so it might lead user to believe there is some error with task but it is not. IAR TAD was made before first KSDK release, so there is no way for IAR TAD to find mqx.tad file because it isn’t part of KSDK. It works only when classic MQX is also installed on computer.   IAR TAD finds mqx.tad file this way (written as example for MQX 4.2): It takes _mqx_version_number defined as hex number 0x04020000 in “mqx\source\kernel\mqx.c” Looks into windows registry key of specified MQX version “HKEY_LOCAL_MACHINE\SOFTWARE\Freescale\FreeScale MQX\4.2” Takes its path variable "PATH"="C:\\Freescale\\Freescale_MQX_4_2" Tries to find mqx.tad file in directory specified in PATH or in its child folder "\tools\tad\" (e.g. C:\Freescale\Freescale_MQX_4_2\tools\tad\mqx.tad)   Solution: Use of fake registry key, which will point to classic MQX installation or some blank directory with only mqx.tad file (e.g. C:\fake_mqx\mqx.tad or better C:\Freescale\KSDK_1.2.0\tools\tad\mqx.tad). This registry key must use MQX version specified in used KSDK (for KSDK 1.2 and 1.3 it is 0x05000200, for 1.1 0x05000001 and for 1.0 0x04010000). Registry key might look like this: Then TAD translates error codes to messages successfully and path to mqx.tad file can be checked in Check for errors view under Show MQX TAD Diagnostics. Attached is example registry key with \tad\mqx.tad structure for placing into KSDK\tools directory.
記事全体を表示
For installation standalone KSDK packages please follow these instructions:   Go to www.freescale.com/ksdk and click to download Is needed to be signed in After that is seen standalone package for FRDM-KL43Z and KL33Z Agree with Software Terms and Conditions Choose installation package according to platform Save file and install it After installation, final folder appears at C:\Freescale\KSDK1.2.0_KL33Z_1.0.0 and Eclipse update - import package to KDS from C:\Freescale\KSDK1.2.0_KL33Z_1.0.0\tools\eclipse_update   Eclipse Update In KDS choose Install New Software Click Add Choose Archive Choose the Eclipse Update zip file located at C:\Freescale\KSDK1.2.0_KL33Z_1.0.0\tools\eclipse_update Select update for KL33Z and KL43Z Accept terms of the license agreement   🙂 Enjoy!
記事全体を表示
The one way how to set TAD shell is to use current example shell for e.g. FRDM-K64F, modified it and use it.   1. Open demo Shell (located at C:\Freescale\KSDK_1.2.0\middleware\tcpip\rtcs\examples\shell\build\kds\shell_frdmk64f) in KDS, as .wsd file 2. Open demo_cmd.c (located at /shell_frdmk64f/Source/demo_cmd.c) and add the line for shell tad, { "echosrv",   Shell_echosrv},     { "echo",      Shell_echo},     { "email",     Shell_smtp },     { "gate",      Shell_gate },     { "gethbn",    Shell_get_host_by_name },     { "getname",   Shell_getname },     { "getrt",     Shell_getroute },     { "ipconfig",  Shell_ipconfig },     { "llmnr",  Shell_llmnrsrv }, { "tad",  Shell_tad },   3. Open tad.c (located at /mqx_frdmk64f/MQX_Generic/tad/tad.c) and remove at the first line:         #if MQX_USE_IO_OLD and last line        #endif // MQX_USE_IO_OLD and included fio library       #include <fio.h>    4. Build libraries first, then build demo shell_frdmk64 5. Set the Tera Term and after typing tad in Tera Term, you will see the output:   Enjoy!   Iva
記事全体を表示
Hello Kinetis users!   I thought this would be the best place to share this code.  Attached is an example of how to use the power manager in the 1.0.0 release of the Kinetis SDK.  It is essentially the legacy low power demo ported to the SDK.  Now, the SDK doesn't provide functions to de-initialize the pins so some of it is a little messy, but it should still help to show you how to use the power manager and how to get in and out of low power modes.    The supported platforms are:   FRDM-K22F FRDM-K64F TWR-K22F120M TWR-K64F120M TWR-KV31F120M   To install the demo, simply unzip the file to the "demos" folder of your SDK installation.  All of the links in the demo are relative so you shouldn't have any trouble.  However, if you do experience any issues, please let me know so that I can correct the issues.    To run the demo, simply build and download the application (a guide of how to do this is provided in the device specific User's Guide in your SDK installation).  Then perform a power-on reset (you always want to do that when working with low power applications) and connect a terminal utility with the following settings:   - 19200 baud rate - 8 data bits - No parity - 1 stop bit - No flow control   Then follow the on-screen instructions.    As a reminder to those wishing to understand low power operations and the Kinetis devices a little more, we do have an Application Note out there to help explain low power operations:  AN4503 Power Management for Kinetis and ColdFire+ MCUs.  This Application Note is in the process of being updated with Kinetis SDK information and is scheduled to be re-published sometime this year.    Enjoy! Chris
記事全体を表示
Because I receive feedback from customers, that it is sometimes complicated to execute this demo, I created short tutorial how to set it and execute it in KDS 3.0.0.   1. Physical connection In case of TWR-K64F, is needed TWR-SER and correctly set jumpers. and for TWR-K64F is needed to set jumper J6 to pins 1 and 2.   Be sure, that the TWR-SER and TWR-K64F is correctly connected (by white line) 2. Network configuration For changing IP address, please go to Network and Sharing Center, choose Change adapter settings Right click on Properties and change the IP address (TCP/IPv4) to 192.168.2.100   3.  Downloading the demo to TWR-K64F Go to KDS, File - Import and browse the demo, which is located at C:\Freescale\KSDK_1.2.0\examples\twrk64f120m\demo_apps\web_hvac\web_hvac_mqx\kds Import all libraries and the demo project and see imported sets in Project Explorer Debug the libraries first and then the project. Be sure, what debugger is used on the board and set the debugger. And now go to Resume!   4. Test the connection Go to cmd and ping to 192.168.2.102 (address of HVAC Server)   5. HVAC Web Server.Go to browser and type the address 192.168.2.102, you will see page for HVAC Web Server. Go to HVAC Demo - HVAC Status and now you can observe the temperatures by pressing button. There are set combinations which means see below. LED1: Simulate the Fan’s state LED2: System in the Heat mode LED3: System in the Cool mode LED4: Simulate the heart beat, increase real temperature (i.e., by hair dryer) to see the LED4 go faster and decrease temperature to see it slow down. So, if is needed increased temperature, push the first button (SW1) and Fan and Heat mode run. LED1 and LED2 will be light on and the temperature will increase.   Enjoy! Iva
記事全体を表示
The SAR-ADC of KM family supports using 4 triggering signals to trigger SAR-ADC, for the KM sub-family with PDB, it is okay to use PDB. But for the KM family without PDB module, it is difficult to generate  4 triggering signals to trigger SAR-ADC. The DOC introduce how to use quadTimer to generate 4 sequential triggering signals to trigger SAR-ADC so taht the SAR-ADC can get 4 samples in one conversion.
記事全体を表示
Recently one of our customers reported an issue when he tried to run "dspi_edma_demo" with KSDK 1.0 on K22F freedom board. He connected SPI signals between master and slave according to the demo user guide on freedom board, but the demo was not working.   I reproduced the issue on freedom and found this is due to incorrect documentation in demo user guide.   The connection table shown in demo user guide for K22F freedom board is as follows. This is not correct.   It should be the following table instead.  Master Connects to Slave Signal Pin Name Board Location Pin Name Board Location SS PTD0 J6 Pin 8 -> PTD4 J2 Pin 6 SCK PTD1 J6 Pin 5 -> PTD5 J2 Pin 12 Data Out PTD2 J6 Pin 6 -> PTD7 J2 Pin 10 Data In PTD3 J6 Pin7 -> PTD6 J2 Pin 8   Also, the associated pin mux configuration in pin_mux.c file should be changed from the original workaround one in red to the original commented one.   void pin_mux_SPI(uint32_t instance)   {     switch(instance) {       case 0:                             /* SPI0 */         /* PORTD_PCR0 */         PORT_HAL_SetMuxMode(g_portBaseAddr[3],0u,kPortMuxAlt2);         //PORT_HAL_SetMuxMode(g_portBaseAddr[2],4u,kPortMuxAlt2);   /*** Temporary work around until next board spin. ***/         /* PORTD_PCR3 */         PORT_HAL_SetMuxMode(g_portBaseAddr[3],3u,kPortMuxAlt2);         //PORT_HAL_SetMuxMode(g_portBaseAddr[2],5u,kPortMuxAlt2);   /*** Temporary work around until next board spin. ***/         /* PORTD_PCR1 */         PORT_HAL_SetMuxMode(g_portBaseAddr[3],1u,kPortMuxAlt2);         //PORT_HAL_SetMuxMode(g_portBaseAddr[2],6u,kPortMuxAlt2);   /*** Temporary work around until next board spin. ***/         /* PORTD_PCR2 */         PORT_HAL_SetMuxMode(g_portBaseAddr[3],2u,kPortMuxAlt2);         //PORT_HAL_SetMuxMode(g_portBaseAddr[2],7u,kPortMuxAlt2);   /*** Temporary work around until next board spin. ***/         break;   }   }  
記事全体を表示