Multi Source Translation Content

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi Source Translation Content

Discussions

Sort by:
s32k314 Debug Hardware Questions Hello, I am designing a PCB using S32K314. This is my first time designing a PCB and I am having a hard time. The debug equipment I am currently using is USB Multilink Universal, Rev. E. And I read Hardware Design Guides for S32K3XX Microcontrollers and drew an example circuit called JTAG connector with a CAD program. But when I look at the manual of USB Multilink Universal, it says JTAG is 14PIN. What should I do? Can I use other debug pins? And even if I can, there are no circuit guidelines in the Hardware Design Guides for S32K3XX Microcontrollers document to pack other debug pins. Please help. This is the JTAG I drew. Re: s32k314 Debug Hardware Questions I looked at the S32K344 - Q172 board and drew it along the circuit. This corresponds to PORTF among the photos you provided. TDO, TDI, and RST have 5V output The TCK is connected to the ground and outputs 0V. However, TMS is connected to PTA4 with 1.5 to 1.6V output. Re: s32k314 Debug Hardware Questions Hi @Oido  The USB Multilink Universal and the USB Multilink Universal FX have several debug headers inside to support NXP devices & other ARM Cortex microcontrollers. For S32K3 devices there are the PORT B (STANDARD ARM), PORT F (MINI 20), and PORT G (MINI 10).  So, we recommend following the circuit guidelines provided in section 4.2 (JTAG and TRACE interface) of the Hardware Design Guides for S32K3XX Microcontrollers. You can also use as a reference the S32K3 Evaluation Board's schematics.  B.R. VaneB
View full article
S32DS ARM调试器没有源文件 我遇到一个问题,我的 ARM IDE 抱怨“没有命名的源文件”,其路径与我正在处理的路径不同,这是不正确的。 请查看附件中的 Debug_Configurations.jpg 文件和 Debugger_Console.jpg 文件,让我解决问题。 调试环境 Windows 11 - 适用于 ARM 版本 2.2 的 S32 设计工作室 - 目标MCU:S32K144F512M15 - 调试器探针:Segger J-Link Base 版本 12.0 回复:S32DS ARM调试器没有源文件 这将被关闭,因为 S32DS ARM 抱怨“没有命名的源文件”似乎对调试没有任何影响。 回复:S32DS ARM调试器没有源文件 供你参考, 在我遇到这个问题之前它一直都在工作。 NXP 社区中的以下链接对我的情况不起作用。 https://community.nxp.com/t5/Kinetis-Design-Studio/breakpoint-quot-No-source-file-named-quot/mp/740013
View full article
AMCLIB_ACIMRotFluxObsrv input parameters We have a three-phase induction machine (IM), of which we want to know the following motor parameters: Rs:            stator resistance [Ohm] Ls:             stator inductance [Henry] Lm:           magnetizing inductance [Henry] Rr:             rotor resistance [Ohm] Lr:              rotor inductance [Henry] For sensorless control of the IM, we use the AMCLIB_ACIMRotFluxObsrv and AMCLIB_ACIMSpeedMRAS. Rs and Ls are measured and verified - thus certain. However, executing the no-load and blocked-rotor test results in Lm >> Lr, Ls (magnetizing inductance greater than the product of stator- and rotor-inductance), which seems legit comparing to other papers and/or results found online. However, fltKrLsTotLeakGain from the AMCLIB_ACIMRotFluxObsrv ends up to be a negative gain in this way as the formula is: ((Lr * Ls) - Lm^2) / Lm This seems to be faulty? Because a negative gain will not work out. What could be a possible cause? Re: AMCLIB_ACIMRotFluxObsrv input parameters Hello @General_motor_control , He knows more about motor control software libraries. You should trust him. I only analyzed based on the T-equivalent circuit, so my view might not cover everything. Sorry for that. BRs, Celeste Re: AMCLIB_ACIMRotFluxObsrv input parameters Hello @Celeste_Liu  Please find the answer of another NXP employee on my question through the following link: https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/AMCLIB-ACIMRotFluxObsrv-input-parameters/m-p/2057099/highlight/true#M10088  What are your thoughts on this? We were redirected to this forum. Kind Regards, Re: AMCLIB_ACIMRotFluxObsrv input parameters Hello @General_motor_control , Thanks for your post. I believe that there is something wrong with your understanding. In the T-equivalent circuit, there is the following formula. For example, in the (PDF) On the Identifiability of Steady-State Induction Machine Models Using External Measurements   The Lm is the mutual equivalent inductance, it should be less than Ls, Lr. So the fltKrLsTotLeakGai formula in document CM7FAMCLIBUG.pdf is correct. Please check your parameter definition or test method. Hope it can help you. BRs, Celeste Re: AMCLIB_ACIMRotFluxObsrv input parameters Dear Veronika, We use an MKV58 on a custom PCB. So no specif MBDT. However, we do use the standard NXP libraries from the AMCLIB - as mentioned previously - the AMCLIB_ACIMRotFluxObsrv and AMCLIB_ACIMSpeedMRAS.  Document: https://www.nxp.com/docs/en/user-guide/CM7FAMCLIBUG.pdf Kind Regards, Re: AMCLIB_ACIMRotFluxObsrv input parameters Hello @General_motor_control  could you please clarify what particular NXP product you reffered to?  Model Based Design Tools (MBDT) are supported by our MBDT experts via NXP technical community only. Could you please submit a new community thread here: https://community.nxp.com/community/mbdt    Our experts will gladly help you there.
View full article
FRDM-MCXN947 - LPUART With PLL0 CLK Hello, I am trying to use LPUART on FRO_HF (48MHz) with baudrate 320400, but MCUs with interrupt are not able to receive all characters, so there are frequent communication failures. How is it possible to connect to LPUART a clock from PLL0 running at 150MHz? Is it necessary to configure PLL0 somehow? Clock|Timers Communication & Control(I3C | I2C | SPI | FlexCAN | Ethernet | FlexIO) MCXN Re: FRDM-MCXN947 - LPUART With PLL0 CLK Hi @John_Adams, I believe this is a duplicated community post from the one seen here: UART Setup on FRDM-MCXN947 - NXP Community In order to prevent double efforts, I will continue supporting you on the aforementioned post. Have a nice day. BR, Edwin. 
View full article
Can lx2160ardb rtc0 support wakeup ? Hello, There are 2 RTCs on lx2160ardb: rtc0 and rtc1. We can see rtc1 support wakealarm, but rtc0 doesn't. Can rtc0 support wakeup by adding attribute 'wakeup-source' in rtc@51 node of the dts? Full log see attachment. root@lx2160ardb:~# ls /sys/class/rtc -l total 0 lrwxrwxrwx 1 root root 0 Nov 29 08:58 rtc0 -> ../../devices/platform/soc/2040000.i2c/i2c-1/1-0051/rtc/rtc0 lrwxrwxrwx 1 root root 0 Nov 29 08:58 rtc1 -> ../../devices/platform/soc/2800000.timer/rtc/rtc1 root@lx2160ardb:~# ls /sys/class/rtc/rtc0 date dev device hctosys max_user_freq name power range since_epoch subsystem time timestamp0 uevent root@lx2160ardb:~# ls /sys/class/rtc/rtc1 alarmtimer.2.auto date dev device hctosys max_user_freq name power since_epoch subsystem time uevent wakealarm Thanks, MinWang@WindRiver Re: Can lx2160ardb rtc0 support wakeup ? rtc0 is not a FlexTimer (FTM). Only FlexTimer can support wakeup source. Re: Can lx2160ardb rtc0 support wakeup ? Thanks for your answer. But I want to know why rtc0 can't support wakeup. Could you please give us more explanation? Re: Can lx2160ardb rtc0 support wakeup ? rtc0 doesn't support wakeup. rtc0 is used to set the system time. rtc1 is FlexTimer (FTM), can support wake-up source and PWM.
View full article
Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power Hello, I hava a problem with my Custom PCB. My code and system works well until I turn ON and OFF power supply supplying ImX. The power supply of my custom board  is the same as mimxrt1170-EVKB Reference Design. I added one Reset Supervisor UmM803RS IC for POR_B and one UML805 for turning off 5->3.3V conveter by making LOW , PMIC_ON_REQ signal. UML805 IC monitors VDD_SNVS_IN. I also used a separate Regulator for SNVS first turnout same as in the reference EVK Design. When I open and close the power supply with 5-10sec short intervals, it works well. However when I continuously press ON OFF button of Power supply, imxrt1176 does not boot and it gets stuck. I added a working LED for observation. So when fast ON-OFF, LED does not toggle. At this stage, I am monitoring that power supply is 13.5V and current drawn is 0.12Amps. I suspect that Power Supply might not give enough current and may somehow interrupt giving output current at this situation. So I added a power resistor in parallel to product while this problem has occured and saw that Voltage is 13.5V and Current is 1.12Amps. So I see that Power Supply is OK and has no interruption. In addition to above, I measured voltages 5V, 3.3V,1.8V and Pmic_Req_On signal levels on PCB.  All voltages seem OK. However as I said, the code is not run.  It seems that IMX would keep itself into protection. What might it be the cause? Where will I focus to solve those problem?  My product needs to be run no matter how quickly I open and close the main power.   Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power You are welcome, I'm very glad to support you in solving your problem. Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power Hi @mayliu1 , I performed lots of tests with MIMXRT1170-EVK during last Friday. I performed 5 different settings according to the "SPF-32171_C3.pdf" schematics document. 1st Setting: U47 Pin Number #1 is disconnected from the PCB On-Float Pin#1 of U47 is connected to the P3 pin of IMXRT1176, which you recommend to pull LOW of DCDC_PSWITCH. I soldered pin#1 in place of R395 intersection point with R396. Pin Number#2 of U356 is soldered to the IMXRT1176 #DCDC_PSWITCH pin.(R1900 and R1899 not populated and left as it was.) 2nd Setting: Only 0R was soldered to the R1899 and R1900. So just want to observe what happen when only External Reset Circuit was used. 3rd Setting: Pin numbered #2 od U356 is soldered to the R395 cross point with DCDC_PSWITCH pin of IMXRT1176. (Just to observe what happens if only switching DCDC_PSWITCH pin.) Again, R1900 and R1899 not populated and left as it was. 4th Setting: pin #1 of U39 (PG), which in case TP32 Point, was soldered to the DCDC_PSWITCH pin of IMXRT1176. I faced the same problem only with the 2nd setting . Other remaining Settings got worked. I could not repeat the issue with them all. So your suggestion to pulling DCDC_PSWITCH TO Low is true and solved the issue seemingly. Thank you very much for your invaluable helps. BR, Burhan Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power Hİ  target=_blank@mayliu1, what must the trigger of Base of transistor be? As based on MIMXRT1170-EVK schematics, Should I trigger base with VLDO_3V3 or VDD_3V3 OR DCDC_1V8_OUT voltage? Which one is best suitable to pull LOW of DCDC_PSWITCH pin? Thanks a lot Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power HI  target=_blank@burhanhagi , Thanks for your updated information. I suggest you can add a transistor in the simplest way. For your other questions, I advise you to create a new case, and our team will do our best to support you. Best Regards MayLiu Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power Hi  target=_blank@mayliu1, Thank you for your quick return:  I want to ask that can I use the below Supervisor circuit ? If I connect RESET pin of below SS circuit to the directly Pin#2 of J77 Connector in your response post; Will it be the correct way to discharge DCDC_PSWITCH pin of IMXRT1170?  Or If I alternatively decide to use any Mosfet to Pull DCDC_PSWITCH low; Should I apply 3.3V SNVS_IN voltage to trigger the mosfet gate? Or something different voltage that I have to use for triggering?   As a second question, in MIMXRT1170-EVK board, there are 2 different Supervisor IC. I am planning to use only UM803RS instead of UM805RE IC? I will use UM803RS to keep Pmic_REQ_ON signal to LOW and thus disabling 5V to 3.3V Converter IC. In eval board, UM805RE does this job. Since I do not need any MR pin, UM803RS seems enough for my task. Does it cause any problem to me later? Thanks for your invaluable helps, BR, Burhan.   Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power Hi  target=_blank@burhanhagi , Thanks for your updated information. I checked your question, I have reviewed the document materials written by an expert  in the relevant field. I think the possible reason  as follows: The short period of power-down and power-up disrupts the power-on sequence (the timing of DCDC_PSWICTH) of the RT chip, finally , it leading to an error in the state of the RT chip's DCDC and causing it to lock up. I will take MIMXRT1170-EVKB board as example: When DCDC_PSWICTH is high, the DCDC begins to operate. The correct timing should be as follows: when 3.3V is applied to DCDC_IN, due to the presence of C286, the 3.3V charges C286,  resulting in DCDC_PSWICTH being pulled high about 2ms later than DCDC_IN. This is done to ensure that the actual input voltage at DCDC_IN reaches a steady state of 3.3V before enabling the DCDC module to operate. Regarding your case: During a short power-down and subsequent power-up, the interval between the two is too short. As a result, during the second stage of power-up, C286 does not have enough time to discharge, it causing DCDC_PSWITCH to remain high. This can enable the DCDC module before the actual input voltage at DCDC_IN reaches the normal operating voltage range of the DCDC, leading to the DCDC state machine becoming locked. At last, the solution is to make sure that the voltage at DCDC_PSWITCH is below 0.5V before each power-up. Therefore, after each power-down, it is necessary to quickly discharge C286 to 0V or quickly pull DCDC_PSWITCH low to 0V. The general recommended approach is to add a transistor or a voltage monitoring chip to achieve this effect. Wish it helps you. If you still have question about it, please kindly let me know. Wish you a nice day! Best Regards MayLiu Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power Hi  target=_blank@mayliu1, Actually, MIMXRT1170-EVK has suffered the same problem. Even though, power supply(+5V) exists and can give current on demand, MIMXRT1170-EVK does not demand/draw any current after some manipulations. Attached is a short video. Pls watch till the end of video showing I am getting the issue. The error happens at 1.27 seconds and later, after power ON/OFF cycle the eval board, it returns to normal working state.  I repeated the issue 5-6 times within 20 minutes with eval board. When issue happens, I connected a power wattage resistor to draw current from Power Supply in order to be sure hat PS can give current in case demanding. PS gave the current without problem.  So, the EVK can not reset and work as you see. So my custom PCB has very very similar power circuits as in the EVK schematics. How can I fix/solve this problem? The board must work every time power enters into it. I actually supply my product with car battery. Car battery does not give smooth voltage/current every time it opens. Besides it, in the field, more unpredictable things may happen, and it causes my board not to work. Therefore, I did try to simulate car battery behaviours. Re: Imxrt1176 Custom board does not RESET when fast turn ON and OFF the main power Hi  target=_blank@burhanhagi , Thank you so much for your interest in our products and for using our community. Regarding this "In addition to above, I measured voltages 5V, 3.3V,1.8V and Pmic_Req_On signal levels on PCB.  All voltages seem OK. However as I said, the code is not run.  It seems that IMX would keep itself into protection." I suspect that  it is related to the reset timing sequence. Please use an oscilloscope to capture the timing diagram of the pins in the following figure. Additionally, check for signals glitches and stability on these pins.     Wish it helps you. If you still have question about it, please kindly let me know. Wish you a nice day! Best Regards MayLiu
View full article
PCA9632 vs PCA9633 Messr NXP, can you confirm that the products PCA9633DP2 and PCA9632DP2Z are perfectly interchangeable in existing boards without any FW intervention? Re: PCA9632 vs PCA9633 Hi Team, I am using the PCA9632DP2Z to drive a 12V RGB LED. Since this IC operates at 5V, I have incorporated a transistor driver circuit. Kindly review the circuit below and share your feedback or suggestions Re: PCA9632 vs PCA9633 Hello Luigi, Both devices support I2C communication with Fast-mode Plus (1 MHz) and share the same register structures with default settings. The slave address is also identical. So, I believe that no FW changes are necessary.  BRs, Tomas
View full article
MIMXRT1064 SPI 你好,我们得到了一块 MIMXRT1064-EVK 板来开发一个在 iMx8QM 上完成的应用程序,这次添加的功能是 SPI,我使用 b2b_master 示例尝试与其他板(raspberry(raspi-os)、arduino uno(arduino)、esp8266(arduino))通信,但无法让 MIMXRT1064 在 SPI 中作为主机或从机工作。 通过使用示波器,我注意到 MIMXRT1064 在传输过程中没有在 SCK 引脚输出任何时钟,arduino 接头的任何 SPI 引脚上都没有任何活动。我尝试了给定的示例并对其进行了修改以使其工作,有没有什么线索可以解释 SPI 不工作的原因? 回复:MIMXRT1064 spi 这是对 freertos_lpspi_b2b_master 稍加修改的代码,只是为了连续(时间间隔)在 SPI 上发送消息。 /* * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc. * Copyright 2016-2019 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ /* FreeRTOS kernel includes. */ #include "FreeRTOS.h" #include "task.h" #include "queue.h" #include "timers.h" /* Freescale includes. */ #include "fsl_device_registers.h" #include "fsl_debug_console.h" #include "fsl_lpspi.h" #include "fsl_lpspi_freertos.h" #include "board.h" #include "app.h" /******************************************************************************* * Definitions ******************************************************************************/ #define TRANSFER_SIZE (16U) /*! Transfer dataSize.*/ #define TRANSFER_BAUDRATE (500000U) /*! Transfer baudrate - 500k */ /******************************************************************************* * Prototypes ******************************************************************************/ /* LPSPI user callback */ extern uint32_t LPSPI_GetInstance(LPSPI_Type *base); /******************************************************************************* * Variables ******************************************************************************/ lpspi_slave_handle_t g_s_handle; uint8_t masterReceiveBuffer[TRANSFER_SIZE] = {0}; uint8_t masterSendBuffer[TRANSFER_SIZE] = {0}; uint8_t slaveSendBuffer[TRANSFER_SIZE] = {0}; SemaphoreHandle_t lpspi_sem; /******************************************************************************* * Definitions ******************************************************************************/ /* Task priorities. */ #define master_task_PRIORITY (configMAX_PRIORITIES - 1) /******************************************************************************* * Prototypes ******************************************************************************/ static void master_task(void *pvParameters); /******************************************************************************* * Code ******************************************************************************/ /*! * @brief Application entry point. */ int main(void) { int i; /* Init board hardware. */ BOARD_InitHardware(); PRINTF("FreeRTOS LPSPI master example starts.\r\n"); PRINTF("This example uses two boards to connect with one as master and anohter as slave.\r\n"); PRINTF("Master and slave are both use interrupt way.\r\n"); PRINTF("Please make sure you make the correct line connection. Basically, the connection is:\r\n"); PRINTF("LPSPI_master -- LPSPI_slave\r\n"); PRINTF(" CLK -- CLK\r\n"); PRINTF(" PCS -- PCS\r\n"); PRINTF(" SOUT -- SIN\r\n"); PRINTF(" SIN -- SOUT\r\n"); PRINTF("\r\n"); /* Initialize data in transfer buffers */ for (i = 0; i < TRANSFER_SIZE; i++) { masterSendBuffer[i] = i % 256; masterReceiveBuffer[i] = 0; slaveSendBuffer[i] = ~masterSendBuffer[i]; } if (xTaskCreate(master_task, "Master_task", configMINIMAL_STACK_SIZE + 64, NULL, master_task_PRIORITY, NULL) != pdPASS) { PRINTF("Task creation failed!.\r\n"); while (1) ; } vTaskStartScheduler(); for (;;) ; } /*! * @brief Task responsible for master SPI communication. */ static void master_task(void *pvParameters) { lpspi_transfer_t masterXfer; lpspi_rtos_handle_t master_rtos_handle; lpspi_master_config_t masterConfig; status_t status; LPSPI_MasterGetDefaultConfig(&masterConfig); masterConfig.baudRate = TRANSFER_BAUDRATE; masterConfig.whichPcs = EXAMPLE_LPSPI_MASTER_PCS_FOR_INIT; status = LPSPI_RTOS_Init(&master_rtos_handle, EXAMPLE_LPSPI_MASTER_BASEADDR, &masterConfig, LPSPI_MASTER_CLK_FREQ); if (status != kStatus_Success) { PRINTF("LPSPI master: error during initialization. \r\n"); vTaskSuspend(NULL); } /*Start master transfer*/ masterXfer.txData = masterSendBuffer; masterXfer.rxData = masterReceiveBuffer; masterXfer.dataSize = TRANSFER_SIZE; masterXfer.configFlags = EXAMPLE_LPSPI_MASTER_PCS_FOR_TRANSFER | kLPSPI_SlaveByteSwap; for(int j=0; j<100; j++){ status = LPSPI_RTOS_Transfer(&master_rtos_handle, &masterXfer); if (status == kStatus_Success) { PRINTF("LPSPI master transfer completed successfully.\r\n"); } else { PRINTF("LPSPI master transfer completed with error.\r\n"); } vTaskDelay(1000); } vTaskSuspend(NULL); } 回复:MIMXRT1064 spi 请注意,从 e 到其他设备的通信正常,问题仅出在 MIMX 板上
View full article
MIMXRT1064 spi Hi, we got a MIMXRT1064-EVK board to develop an application that was done on a iMx8QM, an added feature this time is SPI, i used the b2b_master example to try to communicate with other boards (raspberry(raspi-os), arduino uno (arduino), esp8266(arduino)) but had no luck making the MIMXRT1064 work as master or slave in SPI. By using an oscilloscope i noticed that the MIMXRT1064 doesn't output any clock in the SCK pin during transmission, there is no activity at all on any of the SPI pin of the arduino header. I tried with the given example and also by modifying it trying to make it work, any clue what could be the reason for the SPI not working? Re: MIMXRT1064 spi Solution: it was just a resistor issue, MIMXRT1064-evk doesn't come stock with the arduino header jumper resistors so i had to solder some 0402 0 ohm resistors in place, after this was done everything come back to a working status. Re: MIMXRT1064 spi this is the sligthly modified code of freertos_lpspi_b2b_master just to continously (time interval)  send a message on SPI. /* * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc. * Copyright 2016-2019 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ /* FreeRTOS kernel includes. */ #include "FreeRTOS.h" #include "task.h" #include "queue.h" #include "timers.h" /* Freescale includes. */ #include "fsl_device_registers.h" #include "fsl_debug_console.h" #include "fsl_lpspi.h" #include "fsl_lpspi_freertos.h" #include "board.h" #include "app.h" /******************************************************************************* * Definitions ******************************************************************************/ #define TRANSFER_SIZE (16U) /*! Transfer dataSize.*/ #define TRANSFER_BAUDRATE (500000U) /*! Transfer baudrate - 500k */ /******************************************************************************* * Prototypes ******************************************************************************/ /* LPSPI user callback */ extern uint32_t LPSPI_GetInstance(LPSPI_Type *base); /******************************************************************************* * Variables ******************************************************************************/ lpspi_slave_handle_t g_s_handle; uint8_t masterReceiveBuffer[TRANSFER_SIZE] = {0}; uint8_t masterSendBuffer[TRANSFER_SIZE] = {0}; uint8_t slaveSendBuffer[TRANSFER_SIZE] = {0}; SemaphoreHandle_t lpspi_sem; /******************************************************************************* * Definitions ******************************************************************************/ /* Task priorities. */ #define master_task_PRIORITY (configMAX_PRIORITIES - 1) /******************************************************************************* * Prototypes ******************************************************************************/ static void master_task(void *pvParameters); /******************************************************************************* * Code ******************************************************************************/ /*! * @brief Application entry point. */ int main(void) { int i; /* Init board hardware. */ BOARD_InitHardware(); PRINTF("FreeRTOS LPSPI master example starts.\r\n"); PRINTF("This example uses two boards to connect with one as master and anohter as slave.\r\n"); PRINTF("Master and slave are both use interrupt way.\r\n"); PRINTF("Please make sure you make the correct line connection. Basically, the connection is:\r\n"); PRINTF("LPSPI_master -- LPSPI_slave\r\n"); PRINTF(" CLK -- CLK\r\n"); PRINTF(" PCS -- PCS\r\n"); PRINTF(" SOUT -- SIN\r\n"); PRINTF(" SIN -- SOUT\r\n"); PRINTF("\r\n"); /* Initialize data in transfer buffers */ for (i = 0; i < TRANSFER_SIZE; i++) { masterSendBuffer[i] = i % 256; masterReceiveBuffer[i] = 0; slaveSendBuffer[i] = ~masterSendBuffer[i]; } if (xTaskCreate(master_task, "Master_task", configMINIMAL_STACK_SIZE + 64, NULL, master_task_PRIORITY, NULL) != pdPASS) { PRINTF("Task creation failed!.\r\n"); while (1) ; } vTaskStartScheduler(); for (;;) ; } /*! * @brief Task responsible for master SPI communication. */ static void master_task(void *pvParameters) { lpspi_transfer_t masterXfer; lpspi_rtos_handle_t master_rtos_handle; lpspi_master_config_t masterConfig; status_t status; LPSPI_MasterGetDefaultConfig(&masterConfig); masterConfig.baudRate = TRANSFER_BAUDRATE; masterConfig.whichPcs = EXAMPLE_LPSPI_MASTER_PCS_FOR_INIT; status = LPSPI_RTOS_Init(&master_rtos_handle, EXAMPLE_LPSPI_MASTER_BASEADDR, &masterConfig, LPSPI_MASTER_CLK_FREQ); if (status != kStatus_Success) { PRINTF("LPSPI master: error during initialization. \r\n"); vTaskSuspend(NULL); } /*Start master transfer*/ masterXfer.txData = masterSendBuffer; masterXfer.rxData = masterReceiveBuffer; masterXfer.dataSize = TRANSFER_SIZE; masterXfer.configFlags = EXAMPLE_LPSPI_MASTER_PCS_FOR_TRANSFER | kLPSPI_SlaveByteSwap; for(int j=0; j<100; j++){ status = LPSPI_RTOS_Transfer(&master_rtos_handle, &masterXfer); if (status == kStatus_Success) { PRINTF("LPSPI master transfer completed successfully.\r\n"); } else { PRINTF("LPSPI master transfer completed with error.\r\n"); } vTaskDelay(1000); } vTaskSuspend(NULL); } Re: MIMXRT1064 spi note that communication from e to the other devices work, the problem is just with the MIMX board
View full article
S32Z sd boot with R52_0 Hey to all, was someone able to boot the S32z with sd boot from R52_0?  If yes, how do you initialize the IVT Tool and create the image blob? I was able to boot from sd card the M33 but R52 fails... Regards Sebastian Re: S32Z sd boot with R52_0 Hi @sebastianwelzel, Great to hear the problem is solved. Regarding to your NETC questions. Could you please help me opening a new post with that question? This to maintain the information at this post related to the same topic.  If you want me to support that ticket, please tag me at the post. I will appreciate if you mark the response that help you to solve the main issue of this post as accepted solution.  Re: S32Z sd boot with R52_0 Hi @carlos_o , in the meanwhile the problem is solved... Do you have also information regarding the NETC on S32Z. I would like to setup a port routing as follows: - Frames received on Switch Port 0 should be forwarded to PSI0 and vice versa - Frames received on Switch Port 1 should be forwarded to VSI1 and vice versa My idea was to enable "Frame Modification" and inservt a VLAN tag to ingress frames on Switch ports. But its hard to configure with the configuration tool without any documentation. May you have hint or an idea how to solve my problem? Regards Sebastian Re: S32Z sd boot with R52_0 Hi @sebastianwelzel, The RAM entry point is correct. Can you confirm that the bin file of the code is smaller than before? I'm reviewing possible causes of the code to crash in that function you mentioned. Re: S32Z sd boot with R52_0 Hi @carlos_o , thank´s for the files. I have changed my linker and startup script. It worked so far, that debugging my example project is running! But booting from SD does not work... Can you confirm that I used correct Entry Point? According to MAP file below its 0x32100360 *fill* 0x32100334 0xc 0x32100340 __exceptions_ram_start = . *(.extable) .extable 0x32100340 0x20 ./Project_Settings/Startup_Code/Vector_Table.o 0x32100340 ETABLE 0x32100360 . = ALIGN (0x4) 0x32100360 __exceptions_ram_end = . 0x32100360 __interrupts_ram_start = . *(.intc_vector) .intc_vector 0x32100360 0xf04 ./Project_Settings/Startup_Code/Vector_Table.o 0x32100360 DEFAULT_VECTOR 0x32101264 . = ALIGN (0x4) 0x32101264 __interrupts_ram_end = . 0x32101264 . = ALIGN (0x4) After booting from sd card "Attach Debug" is possible. Code crashes here: void Core_IC_Init(void) { /* Enable exception to take into T32 mode */ write_SCTLR((read_SCTLR() & ~CORE_R52_SCTLR_TE_MASK)|(SET_T32_MODE << CORE_R52_SCTLR_TE_SHIFT)); gic500_enableDistributor(); gic500_enableRedistributor(); gic500_enableCpuInterface(); } regards Re: S32Z sd boot with R52_0 Hi @sebastianwelzel  Apologies I forgot to attach the files. These files are only for example it may vary for your application.  Re: S32Z sd boot with R52_0 HI @carlos_o , I can´t see the attachments... regards Sebastian Re: S32Z sd boot with R52_0 Hi @sebastianwelzel, thanks for sharing the screenshot I found the following information. The binary size is up to 10MB that's because in the linker file int_sram_dram start from 0x31780000 and the int_sram start from 0x32100000, the image have to covery all memory between them even there is no valid data. To reduce the image size, I will recommend you keep sections RUN locations but change their LOAD locations, and the start up code will copy the data from LOAD location to RUN location. For this example, changes will be made in linker file (use AT to specify LOAD location, like code below) and startup.s, you can find modified files in the attachment. .acfls_code_ram : { . += (acfls_code_rom_end - acfls_code_rom_start ); } > int_sram __SDATA = .; .sram_data : AT(__SDATA) { . = ALIGN(4); *(.data) *(.data*) . = ALIGN(4); *(.mcal_data) . = ALIGN(16); __sram_bss_start = .; *(.bss) *(.bss*) . = ALIGN(16); *(.mcal_bss) . = ALIGN(4); __sram_bss_end = .; } > int_sram_dram Please try this to reduce the Size of the bin file and generate your blob.  Re: S32Z sd boot with R52_0 HI @carlos_o , attached a screenshot of the IVT Tool. Only Applicatiuon bootloader is used. Ohter fields are greyed out. I assume that everything is correct. As mentioned, I´ve changed the linker file to have Binary that fits into 7MB RAM. If the DRAM is used in the linker file at address 0x31780000, the resulting Binary is 11MB and the IVT tool messages an error that SRAM is smaller than 11MB... How to solve this problem? RTD are Real Time Drivers AUTOSAR R21-11 Version 2.0.0 Re: S32Z sd boot with R52_0 Hi @sebastianwelzel, I can confirm that the process to create the blob image for the R core is the same as the M cores. You only need to make sure that the boot target being the R52 core. The Ram entry pointer you are using is correct. It needs to be the VTABLE value.  Could you share a screenshot of you IVTView.  Which RTD version are you using? Re: S32Z sd boot with R52_0 Hi Carlos, yes I treid to run the R52 in debug session. If I do, all is running as expected... I´ve started an "Attach" session after booting from sd card, to see were the firmware is hanging. From my point of view there is problem in the "gic500_enableDistributor" function. Accessing registers in memory spac 0x47800000 seems to be the problem or not possible. After writing to this memory, program starts again at "entry point" (isr) Are the steps to create the binary blob for R52 the same as for M33? What about DRAM section? The binary created from porject was about 10MB, much bigger than CRAM section. So I modified the linker file. I pushed the dram from 0x31780000 to 0x32100000 and also shift the sram to 0x32200000 to have a binary file whichnfits into 7MB SRAM. Is there another way to create the blob file? regards Sebastian Re: S32Z sd boot with R52_0 Hi @sebastianwelzel, Thanks for sharing your steps.  Did you debug the R52 project before try to pass it to the SD card?  This to confirm that the error is at the IVT or Boot process instead of the project itself.  Re: S32Z sd boot with R52_0 Hi Carlos, to boot M33 I performed the following: 1. Create *.bin file  2. Use IVT tool to create the blob image         - Boot Target: System Manager M33         - Application Bootloader: Import *bin file         - set RAM start pointer/RAM entry pointer         - Export Image         - Export Blob image         - write binary to sd card and set BOOT Pins of S32Z to SD Boot This is procedure which I was using also for the R52. May there is a missunderstand for RAM entry pointer. I´ve used the "intc_vector" for it.... regards Sebastian Re: S32Z sd boot with R52_0 Hi @sebastianwelzel, Could you share which steps are you following to run boot the M33 with the SD Card? Also, are you trying to follow these same steps for the R52?
View full article
使用 R52_0 的 S32Z SD 启动 大家好, 有人能够从 R52_0 使用 sd 启动来启动 S32z 吗? 如果是,您如何初始化 IVT 工具并创建图像 blob? 我能够从 SD 卡启动 M33,但 R52 失败了…… 此致 Sebastian
View full article
S32Z SDブーツR52_0付き 皆さん、こんにちは。 誰かがR52_0からSDブートでS32zを起動できましたか? はいの場合、IVTツールをどのように初期化し、画像ブロブを作成しますか? SDカードからM33を起動できましたが、R52は失敗します... よろしくお願いします。 セバスチャン
View full article
MIMXRT1064 SPI こんにちは、私たちはiMx8QMで行われたアプリケーションを開発するためにMIMXRT1064-EVKボードを手に入れました、今回はSPIです、私は他のボード(ラズベリー(raspi-os)、arduino uno(arduino)、esp8266(arduino))と通信しようとb2b_master例を使用しましたが、SPIでMIMXRT1064をマスターまたはスレーブとして機能させることはできませんでした。 オシロスコープを使用して、送信中にMIMXRT1064がSCKピンにクロックを出力せず、arduinoヘッダーのSPIピンのいずれにもアクティビティがまったくないことに気付きました。私は与えられた例で試し、それを機能させようとして修正することによって、SPIが機能しない理由が何であるかについての手がかりはありますか? 日時:MIMXRT1064 SPI これは、SPIでメッセージを継続的(時間間隔)送信するためだけにfreertos_lpspi_b2b_masterのわずかに変更されたコードです。 /* * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc. * Copyright 2016-2019 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ /* FreeRTOS kernel includes. */ #include "FreeRTOS.h" #include "task.h" #include "queue.h" #include "timers.h" /* Freescale includes. */ #include "fsl_device_registers.h" #include "fsl_debug_console.h" #include "fsl_lpspi.h" #include "fsl_lpspi_freertos.h" #include "board.h" #include "app.h" /******************************************************************************* * Definitions ******************************************************************************/ #define TRANSFER_SIZE (16U) /*! Transfer dataSize.*/ #define TRANSFER_BAUDRATE (500000U) /*! Transfer baudrate - 500k */ /******************************************************************************* * Prototypes ******************************************************************************/ /* LPSPI user callback */ extern uint32_t LPSPI_GetInstance(LPSPI_Type *base); /******************************************************************************* * Variables ******************************************************************************/ lpspi_slave_handle_t g_s_handle; uint8_t masterReceiveBuffer[TRANSFER_SIZE] = {0}; uint8_t masterSendBuffer[TRANSFER_SIZE] = {0}; uint8_t slaveSendBuffer[TRANSFER_SIZE] = {0}; SemaphoreHandle_t lpspi_sem; /******************************************************************************* * Definitions ******************************************************************************/ /* Task priorities. */ #define master_task_PRIORITY (configMAX_PRIORITIES - 1) /******************************************************************************* * Prototypes ******************************************************************************/ static void master_task(void *pvParameters); /******************************************************************************* * Code ******************************************************************************/ /*! * @brief Application entry point. */ int main(void) { int i; /* Init board hardware. */ BOARD_InitHardware(); PRINTF("FreeRTOS LPSPI master example starts.\r\n"); PRINTF("This example uses two boards to connect with one as master and anohter as slave.\r\n"); PRINTF("Master and slave are both use interrupt way.\r\n"); PRINTF("Please make sure you make the correct line connection. Basically, the connection is:\r\n"); PRINTF("LPSPI_master -- LPSPI_slave\r\n"); PRINTF(" CLK -- CLK\r\n"); PRINTF(" PCS -- PCS\r\n"); PRINTF(" SOUT -- SIN\r\n"); PRINTF(" SIN -- SOUT\r\n"); PRINTF("\r\n"); /* Initialize data in transfer buffers */ for (i = 0; i < TRANSFER_SIZE; i++) { masterSendBuffer[i] = i % 256; masterReceiveBuffer[i] = 0; slaveSendBuffer[i] = ~masterSendBuffer[i]; } if (xTaskCreate(master_task, "Master_task", configMINIMAL_STACK_SIZE + 64, NULL, master_task_PRIORITY, NULL) != pdPASS) { PRINTF("Task creation failed!.\r\n"); while (1) ; } vTaskStartScheduler(); for (;;) ; } /*! * @brief Task responsible for master SPI communication. */ static void master_task(void *pvParameters) { lpspi_transfer_t masterXfer; lpspi_rtos_handle_t master_rtos_handle; lpspi_master_config_t masterConfig; status_t status; LPSPI_MasterGetDefaultConfig(&masterConfig); masterConfig.baudRate = TRANSFER_BAUDRATE; masterConfig.whichPcs = EXAMPLE_LPSPI_MASTER_PCS_FOR_INIT; status = LPSPI_RTOS_Init(&master_rtos_handle, EXAMPLE_LPSPI_MASTER_BASEADDR, &masterConfig, LPSPI_MASTER_CLK_FREQ); if (status != kStatus_Success) { PRINTF("LPSPI master: error during initialization. \r\n"); vTaskSuspend(NULL); } /*Start master transfer*/ masterXfer.txData = masterSendBuffer; masterXfer.rxData = masterReceiveBuffer; masterXfer.dataSize = TRANSFER_SIZE; masterXfer.configFlags = EXAMPLE_LPSPI_MASTER_PCS_FOR_TRANSFER | kLPSPI_SlaveByteSwap; for(int j=0; j<100; j++){ status = LPSPI_RTOS_Transfer(&master_rtos_handle, &masterXfer); if (status == kStatus_Success) { PRINTF("LPSPI master transfer completed successfully.\r\n"); } else { PRINTF("LPSPI master transfer completed with error.\r\n"); } vTaskDelay(1000); } vTaskSuspend(NULL); } 日時:MIMXRT1064 SPI E から他のデバイスへの通信は機能しますが、問題は MIMX ボードだけであることに注意してください
View full article
LPC82x wake-up time On which page of the datasheet or user guide is the wake-up time of the LPC82x listed? Re: LPC82x wake-up time Hi Ryo10, Current DS and UM don't have this  LPC82x wake-up time. Here is wake-up time test result. only for your reference. Low Power Mode Wake-up time (only for Ref.) Sleep mode 2.6us Deep-sleep mode 4us Power-downmode 50us Deep Power-downmode 215us Hope this will help you, Jun Zhang
View full article
LPC82xウェイクアップ時間 LPC82xのウェイクアップ時間は、データシートまたはユーザーガイドのどのページに記載されていますか?
View full article
NOR flash programming issue Hi,    In my custom board using processor T1014 .When I try to program Uboot.bin into NOR flash, it cannot end when programming to the last sector. I have done unprotect and erase before program. The following is the log output by codewarrior : fl::target -lc "t10104_connect_sram_flash-core00_RAM_T1014_Download" fl::target -b 0x0 0x20000 fl::target -v off -l off cmdwin::fl::device -d "lisco-S29GL01GP" -o "64Mx16x1" -a 0xe8000000 0xefffffff cmdwin::fl::protect all off Beginning Operation ... ------------------------- Performing target initialization ... Downloading Flash Diagnostics Driver ... Reading flash ID ... Unprotecting all sectors... Unprotecting ... Unprotecting .... Unprotecting ..... Unprotecting ...... Unprotect Command Succeeded cmdwin::fl::image -f "C:\\Users\\MPC1\\Desktop\\MPC\\nor_flash_dump\\nor_uboot_current_uboot.bin" -t "Auto Detect" -re off -oe on -o 0xeff40000 cmdwin::fl::erase image ------------------------- Auto-detection is successful. File is of type Binary/Raw Format. Downloading Flash Device Driver ... Reading flash ID ... Erasing Sector 0xEFF40000 to 0xEFF5FFFF Erasing Sector 0xEFF60000 to 0xEFF7FFFF Erasing Sector 0xEFF80000 to 0xEFF9FFFF Erasing Sector 0xEFFA0000 to 0xEFFBFFFF Erasing Sector 0xEFFC0000 to 0xEFFDFFFF Erasing Sector 0xEFFE0000 to 0xEFFFFFFF Erasing .... Erase Command Succeeded cmdwin::fl::write verify Beginning Operation ... ------------------------- Programming file C:\Users\MPC1\Desktop\MPC\nor_flash_dump\nor_uboot_current_uboot.bin Auto-detection is successful. File is of type Binary/Raw Format. Downloading Flash Device Driver ... Reading flash ID ... Auto-detection is successful. File is of type Binary/Raw Format. Downloading 0x00010000 bytes to be programmed at 0xEFF40000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFF50000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFF60000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFF70000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFF80000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFF90000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFFA0000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFFB0000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFFC0000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFFD0000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Program with Verify Command Succeeded Downloading 0x00010000 bytes to be programmed at 0xEFFE0000 Executing program with verify .... Program with Verify Command Succeeded Downloading 0x0000FFFF bytes to be programmed at 0xEFFF0000 Executing program with verify .... Executing program with verify ..... Executing program with verify ...... Executing program with verify ....... Executing program with verify ........ Executing program with verify ......... Executing program with verify .......... Executing program with verify ........... Executing program with verify ............ Executing program with verify ............. Executing program with verify .............. Executing program with verify ............... Executing program with verify ................ Executing program with verify ................. Executing program with verify .................. Executing program with verify ................... Executing program with verify .................... Executing program with verify ..................... Executing program with verify ...................... Executing program with verify ....................... Executing program with verify ........................ Executing program with verify ......................... Executing program with verify .......................... Executing program with verify ........................... Executing program with verify ............................ Executing program with verify ............................. Executing program with verify .............................. Executing program with verify ............................... Executing program with verify ................................ Executing program with verify ................................. Executing program with verify .................................. Executing program with verify ................................... Executing program with verify .................................... Executing program with verify ..................................... Executing program with verify ...................................... Executing program with verify ....................................... Executing program with verify ........................................ Executing program with verify ......................................... Executing program with verify .......................................... Executing program with verify ........................................... Executing program with verify ............................................ Executing program with verify ............................................. Executing program with verify .............................................. Executing program with verify ............................................... Executing program with verify ................................................ Executing program with verify ................................................. Executing program with verify .................................................. Executing program with verify ................................................... Executing program with verify .................................................... Executing program with verify ..................................................... Executing program with verify ...................................................... Executing program with verify ....................................................... Executing program with verify ........................................................ Executing program with verify ......................................................... Executing program with verify .......................................................... Executing program with verify ........................................................... Executing program with verify ............................................................ Executing program with verify ............................................................. Executing program with verify .............................................................. This will repeat the loop and never end.  My codewarrior settings in below screenshot.  Regards, Detrois Huang QorIQ T1 Devices Re: NOR flash programming issue I discovered that when I write the same file to the address: EBF40000, it is successful. Therefore, I suspect there is an issue with CodeWarrior. After having the hardware pull the NOR flash address pin to 1 (forcing B to become F), I wrote to EBF40000 again. The experiment was successful, tricking CodeWarrior into writing the value to the address EFF40000 without any errors.
View full article
S32K144 2 ADC with PDB Trigger Hi, I am trying to sample 2 ADCs with 4 Channels each with 1 PDB module. i am trying to sample both ADCs continuously and send an interrupt on when the 4th Conversion is done (for each ADC) then write it to my terminal. I have multiple questions: 1. it samples only ADC0 one time and stops (ADC1 is not sampled at all and ADC0 is only sampled once). why? 2. The results are not written to my terminal. i programmed a print function in the ADC handler. why? PS: i tried the continous mode for the pdb and the back to back mode for the pretriggers.  void print(const char *sourceStr) {     uint32_t bytesRemaining;       /* Send data via LPUART */     LPUART_DRV_SendData(INST_LPUART_1, (uint8_t *) sourceStr, strlen(sourceStr));    // LPUART_DRV_SendDataPolling(INST_LPUART_1, (uint8_t *) sourceStr, strlen(sourceStr));     /* Wait for transmission to be successful */     while (LPUART_DRV_GetTransmitStatus(INST_LPUART_1, &bytesRemaining)             != STATUS_SUCCESS)     {     } }   /* The IRQ handler uses the default IRQ handler weak symbol defined in startup (.S) file */   void PDB0_IRQHandler(void) {   /* Clear PDB instance Interrupt flag */   PDB_DRV_ClearTimerIntFlag(INST_PDB_0);     print("Timer restarting"); }     void ADC0_IRQHandler(void) {   /* Clear PDB instance Interrupt flag */   PDB_DRV_ClearTimerIntFlag(INST_PDB_0);     if(ADC_DRV_GetConvCompleteFlag(INST_ADC_CONFIG_1, 3)){     ADC_DRV_GetChanResult(INST_ADC_CONFIG_1,0U, &res[0]);   ADC_DRV_GetChanResult(INST_ADC_CONFIG_1,1U, &res[1]);   ADC_DRV_GetChanResult(INST_ADC_CONFIG_1,2U, &res[2]);   ADC_DRV_GetChanResult(INST_ADC_CONFIG_1,3U, &res[3]);     adcConvDone = true;   inc++;     for(int i = 0; i<4 ; i++){       print("ADC 0 results are :");     uint16ToStr(&res[i], msg[i], 5);     print(msg[i]);   }     }   else counter++; } void ADC1_IRQHandler (void){   // /* Clear PDB instance Interrupt flag */   PDB_DRV_ClearTimerIntFlag(INST_PDB_0);   if(ADC_DRV_GetConvCompleteFlag(INST_ADC_CONFIG_2, 3)){     ADC_DRV_GetChanResult(INST_ADC_CONFIG_2,0U, &res1[0]);   ADC_DRV_GetChanResult(INST_ADC_CONFIG_2,1U, &res1[1]);   ADC_DRV_GetChanResult(INST_ADC_CONFIG_2,2U, &res1[2]);   ADC_DRV_GetChanResult(INST_ADC_CONFIG_2,3U, &res1[3]);     for(int j = 0; j<4 ; j++){         print("ADC 1 results are :");       uint16ToStr(&res1[j], msg1[j], 5);       print(msg1[j]);   }   } } bool calculateIntValue(const pdb_timer_config_t * const pdbConfig, const uint32_t uSec, uint16_t * const intVal) {     /* Local variables used to store different parameters      * such as frequency and prescalers      */     uint32_t    intVal_l            = 0;     uint8_t     pdbPrescaler        = (1 << pdbConfig->clkPreDiv);     uint8_t     pdbPrescalerMult    = 0;     uint32_t    pdbFrequency;       bool resultValid = false;       /* Get the Prescaler Multiplier from the configuration structure */     switch (pdbConfig->clkPreMultFactor)     {         case PDB_CLK_PREMULT_FACT_AS_1:             pdbPrescalerMult    =   1U;             break;         case PDB_CLK_PREMULT_FACT_AS_10:             pdbPrescalerMult    =   10U;             break;         case PDB_CLK_PREMULT_FACT_AS_20:             pdbPrescalerMult    =   20U;             break;         case PDB_CLK_PREMULT_FACT_AS_40:             pdbPrescalerMult    =   40U;             break;         default:             /* Defaulting the multiplier to 1 to avoid dividing by 0*/             pdbPrescalerMult    =   1U;             break;     }       /* Get the frequency of the PDB clock source and scale it      * so that the result will be in microseconds      */     CLOCK_SYS_GetFreq(CORE_CLK, &pdbFrequency);     pdbFrequency /= 1000000;       /* Calculate the interrupt value for the prescaler, multiplier, frequency      * configured and time needed.      */     intVal_l = (pdbFrequency * uSec) / (pdbPrescaler * pdbPrescalerMult );       /* Check if the value belongs to the interval */     if((intVal_l == 0) || (intVal_l >= (1 << 16)))     {         resultValid = false;         (*intVal) = 0U;     }     else     {         resultValid = true;         (*intVal) = (uint16_t)intVal_l;     }       return resultValid; }   //char msg[30]; uint16_t dutyCycle = 0U;     int main(void) {   status_t error;     /* Configure clocks for PORT */     CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,   g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);   CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);     /* Set pins as GPIO */   error = PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);   DEV_ASSERT(error == STATUS_SUCCESS);     /* Set Output value LED_Green & LED_Red */   PINS_DRV_SetPins(LED_Green_PORT, 1 << LED_Green_PIN); //  //PINS_DRV_SetPins(LED_Red_PORT, 1 << LED_Red_PIN); uint16_t pdbTimerVal; char value[30]; if (LPUART_DRV_Init(INST_LPUART_1, &lpUartState0, &lpuart_0_InitConfig0) != STATUS_SUCCESS) __asm("bkpt #255"); ftm_state_t ftmStateStruct; /* Initialize FTM instance */ FTM_DRV_Init(INST_FLEXTIMER_PWM_1, &flexTimer_pwm_1_InitConfig, &ftmStateStruct); /* Initialize FTM PWM */ FTM_DRV_InitPwm(INST_FLEXTIMER_PWM_1, &flexTimer_pwm_1_PwmConfig); /*ADC0 and ADC1 Configuration*/ ADC_DRV_ConfigConverter(INST_ADC_CONFIG_1, &adc_config_1_ConvConfig0); ADC_DRV_ConfigConverter(INST_ADC_CONFIG_2, &adc_config_2_ConvConfig0); /*ADC0 and ADC1 Auto Calibration*/ ADC_DRV_AutoCalibration(INST_ADC_CONFIG_1); ADC_DRV_AutoCalibration(INST_ADC_CONFIG_2); /*PDB Configuration*/ PDB_DRV_Init(INST_PDB_0,&pdb_config_1_timerConfig0); /*ADC0 Channel Configuration*/ ADC_DRV_ConfigChan(INST_ADC_CONFIG_1, 0U, &Current_Sense_3); ADC_DRV_ConfigChan(INST_ADC_CONFIG_1, 1U, &Voltage_Sense_2); ADC_DRV_ConfigChan(INST_ADC_CONFIG_1, 2U, &Voltage_Sense_3); ADC_DRV_ConfigChan(INST_ADC_CONFIG_1, 3U, &Current_Sense_2); /*ADC1 Channel Configuration*/ ADC_DRV_ConfigChan(INST_ADC_CONFIG_2, 0U, &Current_Sense_1); ADC_DRV_ConfigChan(INST_ADC_CONFIG_2, 1U, &Current_Sense_4); ADC_DRV_ConfigChan(INST_ADC_CONFIG_2, 2U, &Voltage_Sense_1); ADC_DRV_ConfigChan(INST_ADC_CONFIG_2, 3U, &Voltage_Sense_4); /*Check if the Interrupt value is ok*/ DEV_ASSERT(calculateIntValue(&pdb_config_1_timerConfig0, TIMEOUT_US, &pdbTimerVal) == true); /*Pre-Trigger Configuration for ADC0 (CH0 of the PDB)*/ PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,0,&pdb_config_1_adc0TrigConfig0); PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,0,&pdb_config_1_adc0TrigConfig1); PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,0,&pdb_config_1_adc0TrigConfig2); PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,0,&pdb_config_1_adc0TrigConfig3); /*Pre-Trigger Configuration for ADC1 (CH1 of the PDB)*/ PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,1,&pdb_config_1_adc1TrigConfig0); PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,1,&pdb_config_1_adc1TrigConfig1); PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,1,&pdb_config_1_adc1TrigConfig2); PDB_DRV_ConfigAdcPreTrigger(INST_PDB_0,1,&pdb_config_1_adc1TrigConfig3); /*set the Modulus value*/ PDB_DRV_SetTimerModulusValue(INST_PDB_0, pdbTimerVal); /*set Pre-Trigger Delays for PDB CH0*/ PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 0, 0, 400); PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 0, 1, 800); PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 0, 2, 1200); PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 0, 3, 1400); /*set Pre-Trigger Delays for PDB CH1*/ PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 1, 0, 400); PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 1, 1, 800); PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 1, 2, 1200); PDB_DRV_SetAdcPreTriggerDelayValue(INST_PDB_0, 1, 3, 1400); INT_SYS_EnableIRQ(PDB0_IRQn); /*set the Interrupt value*/ PDB_DRV_SetValueForTimerInterrupt(INST_PDB_0, pdbTimerVal); print("pdbTimerVal :"); uint16ToStr(&pdbTimerVal, value, 5); print(value); /*Load Values into the PDB*/ PDB_DRV_LoadValuesCmd(INST_PDB_0); /*Enable the PDB*/ PDB_DRV_Enable(INST_PDB_0); /*enable NVIC Interrupts for ADC0*/ INT_SYS_EnableIRQ(ADC0_IRQn); /*enable NVIC Interrupts for ADC1*/ INT_SYS_EnableIRQ(ADC1_IRQn); /* Trigger PDB timer */ PDB_DRV_SoftTriggerCmd(INST_PDB_0); Re: S32K144 2 ADC with PDB Trigger I'm using PTD2 (ADC1 channe2)and PTE6(ADC1 channel 11) to read analog values.The structure defined for PDB_DRV_ConfigAdcPreTrigger API is shown below. const pdb_adc_pretrigger_config_t pdb_1_adcTrigConfig0 = {     .adcPreTriggerIdx = 0U,     .preTriggerEnable = true,     .preTriggerOutputEnable = true,     .preTriggerBackToBackEnable = false };   const pdb_adc_pretrigger_config_t pdb_1_adcTrigConfig1 = {     .adcPreTriggerIdx = 3U,     .preTriggerEnable = true,     .preTriggerOutputEnable = true,     .preTriggerBackToBackEnable = true };   const adc_chan_config_t adConv1_ChnConfig0 = {   .interruptEnable = true,   .channel = ADC_INPUTCHAN_EXT2 };     const adc_converter_config_t adConv1_ConvConfig0 = { .clockDivide = ADC_CLK_DIVIDE_1, .sampleTime = 12U, .resolution = ADC_RESOLUTION_12BIT, .inputClock = ADC_CLK_ALT_1, .trigger = ADC_TRIGGER_HARDWARE, .pretriggerSel = ADC_PRETRIGGER_SEL_PDB, .triggerSel = ADC_TRIGGER_SEL_PDB,   .dmaEnable = false,   .voltageRef = ADC_VOLTAGEREF_VREF,   .continuousConvEnable = true,   .supplyMonitoringEnable = false };   const adc_chan_config_t adConv1_ChnConfig1 = {   .interruptEnable = true,   .channel = ADC_INPUTCHAN_EXT11 };  I'm not able read the analog value from PTE6 pin. Please let me know where I'm going wrong. I have attached the codebase below. Re: S32K144 2 ADC with PDB Trigger hi,I Have a problem, What is TrgmuxOut2? I can't understand what is TrgmuxOut2 as Trigger object? Re: S32K144 2 ADC with PDB Trigger Hi@snow3847 if you use FTM Init Trigger as PDB trigger source then you don't need to do it, because it is a internal signal. Re: S32K144 2 ADC with PDB Trigger do i need to map the TRGMUX also in the pinout section? Re: S32K144 2 ADC with PDB Trigger Hi@snow3847 For FTM,you can use FTM init as Trigger source. For example: Enable FTM init trigger: Re: S32K144 2 ADC with PDB Trigger Hi, Thank you for the response. Now i understand that PDB0 is for ADC0 and PDB1 is for ADC1 but i have a question : how do i synchronise them? i want the conversion on ADC0 and on ADC1 to start on the same time. if i understood correctly we should use TRGMUX and FTM. if so can you tell me to parametrise TRGMUX (in the pinout section and peripheral section of s32DS) because i barely found documentation on that. i will attach what i did under my reply. thank you . Re: S32K144 2 ADC with PDB Trigger Hi@snow3847 But in your code, One PDB instance to trigger two ADC instances.
View full article
S32K344 ABZ encoder Regarding the ABZ encoder interface of S32K344, I would like to ask a question. The ST MCU I used before only had one register CNT for counting. When the motor rotates forward, the register CNT counts from the current value to 4096, and when it reverses, it counts from the current value to 0. Angle=CNT/4095 * 360. Now there are two counters in S32K344. When the motor rotates forward, CW counts from the current value to 4096, The CCW value remains unchanged, and when the motor reverses, the CCW counter counts from the current value to 4096, How can I get the angle when the CW value remains unchanged? As shown in the figure below, I want to directly obtain angle values from 0 to 360 degrees based on counterCW and counterCCW. Re: S32K344 ABZ encoder I tested the ABZ magnetic encoder interface, the underlying reference S32K344 motor control suite, using ACTUATE () to get a 0-360 angle, and zero the angle by offset in the Z interrupt. The reference code is as follows: static volatile uint16_t counterCWOffset = 0; extern eMIOS_Type * const s_emiosBase[]; float ACTUATE_GetPos(void) { uint16_t counterCW,counterCCW; float Absolut_position; /* read encoder edges to get mechanical position */ // counterCW = (int16_t)(Emios_Icu_Ip_GetEdgeNumbers(0U, 5U)); /* CW counter */ // counterCCW = (int16_t)(Emios_Icu_Ip_GetEdgeNumbers(0U, 6U)); /* CCW counter */ counterCW = (uint16_t)s_emiosBase[0]->CH.UC[5].CNT - counterCWOffset; counterCCW = (uint16_t)s_emiosBase[0]->CH.UC[6].CNT; Absolut_position = (float)(((uint16_t)(counterCW-counterCCW))&(uint16_t)(4095)) * 0.0879120879120879F; /* 360 divided by 4095 */ return Absolut_position; } void ENC_PHZ_Handler(void) { counterCWOffset = (uint16_t)(s_emiosBase[0]->CH.UC[5].CNT - s_emiosBase[0]->CH.UC[6].CNT); // Emios_Icu_Ip_ResetEdgeCount(0,5); /*Clear A Edge Count*/ // Emios_Icu_Ip_ResetEdgeCount(0,6); /*Clear B Edge Count*/ // Emios_Icu_Ip_SetInitialCounterValue(0U, 5U, (uint32_t)0x1U); // Emios_Icu_Ip_SetInitialCounterValue(0U, 6U, (uint32_t)0x1U); // Emios_Icu_Ip_SetMaxCounterValue(0U, 5U, (uint32_t)(4096U)); // Emios_Icu_Ip_SetMaxCounterValue(0U, 6U, (uint32_t)(4096U)); // Emios_Icu_Ip_EnableEdgeCount(0u, 5U); // Emios_Icu_Ip_EnableEdgeCount(0u, 6U); } Re: S32K344 ABZ encoder Hi, Thank you so much for your interest in our products and for using our community. In 4.2.5. Quadrature decoder section from AN13767: 3-phase Sensorless PMSM Motor Control Kit with S32K344 using RTD Low Level API you can see that it is performed a sum between counterCW and counterCCW to get the absolute position and then is processed by the angle tracking observer (ATO) to get the rotor position. For more detail you can also refer to the MCSPTE1AK344 Development Kit Application Software. Hope it helps you. Have a nice day!
View full article
Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK I've ported the NXPNCI library examples over to a MCXN236 MCUXpresso board and keep getting errors within the NxpNci_CheckDevPres() function. It seems to fail on sending the NCICoreReset data. I've confirmed correct HW connections, but continue to get data failures in 3 different scenarios: Scenario #1: Using FLEXIO_I2C_MasterTransferBlocking() with no retries, the program hangs in an infinite loop after receiving a shifter error flag from the FLEXIO module (which is interpreted as a NACK). Scenario #2: Using FLEXIO_I2C_MasterTransferBlocking() with retries (3), the program aborts the write process after receiving a shifter error flag from the FLEXIO module (which is interpreted as a NACK). Scenario #3: Using FLEXIO_I2C_MasterTransferNonBlocking() with retries (3), the program writes with no error, but fails when attempting to receive an answer back from the PN7160 NFC chip. This results in continuous writes with no returned data. Per https://www.nxp.com/docs/en/user-manual/UM11496.pdf, I am setting up the pins accordingly and using the default device address 0x28.  I'm currently using the FLEXIO_I2C functions in place of the I2C functions called out in the original TML files for the examples. Since I'm using the pin, clock and peripheral configuration tools, I had to reroute some of the code in the TML files to point to the pin_mux.h/.c and peripheral.h/.c files. I've attached the project here if anyone has the HW and wants to try. NOTE: because of file size limits, I had to separately compress the debug folder outside of the project folder. To bring up this project, you will either have to decompress the debug folder and place it  back into the root folder for the project - OR - create a new debug as MCUXpresso IDE LinkServer. Pinout from MCXN236 to OM27160 are as follows... SCL: FLEXIO D21 (J4, Pin 12) ---> J2, Pin 1 SDA: FLEXIO D20 (J4, Pin 10) ---> J2, Pin 2 GND: J4, Pin 3 ---> J1, Pin 6 VDD: 3.3V (J3, Pin 😎 ---> J1, Pin 4 VBAT: 5V (J3, Pin 10) ---> J1, Pin 5 IRQ: J7, Pin 4 ---> J1, Pin 10 VEN: J7, Pin 5 ---> J4, Pin 1 DWL_REQ: J6, Pin 6 ---> J4, Pin 2 Communication & Control(I3C | I2C | SPI | FlexCAN | Ethernet | FlexIO) MCXN Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK I was finally able to get this pairing to work. A clue that helped me was getting the LPC824 example working, which didn't work unless I had the board directly mounted on top (no extra cable length attached between boards), which seems like a drive strength issue for the MCUXpresso boards. Understanding that, I reconfigure my MCXN Xpresso board to have the same pinout that aligns with the arduino headers that connect to the OM27160A1EVK. Once I did that, I placed the OM27160A1EVK board directly on top of the Xpresso board using J1 through J4. I then, just soldered pins on top of the OM27160A1EVK I2C and IRQ signals to probe with a logic analyzer.   Another caveat that I noticed is that the program only seems to work when debug output (NCI_DEBUG) is enabled. For some reason, a time delay is needed between a buffer read and when it is being accessed for comparison. Otherwise, I get failures when the NCI library is comparing the received data to the expected response bytes. My assumption is that the debug adds extra time between read/write and buffer access, allowing the buffer to make the correct data available in memory. The specific design that I'm working on should be tolerant of a small delay in reads, but this seems like a flaw for the MCXN236. Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK @KaiLi , In the case when it starts discovery and then enters an infinity loop, I see that the SCL and SDA lines get out of sync and there is a repeated pattern of read 0x7F with NACK This screenshot above shows the bursts of data that occurs in the infinite loop in ~500ms intervals. This screenshot above shows the repeated ~15ms burst of data that occurs every ~500ms. Screenshot above shows the data within that burst in a zoomed in view. It also shows SDA and SCL getting out of sync and the IRQ signal toggling. Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK @KaiLi , Is there a list of commands that I can view to help debug? Sometimes I get an unexpected response. The NCIStartDiscovery command in NxpNci_StartDiscovery() is expecting [0x41, 0x03] for the first two byte, but gets back [0x41, 0x00]. Currently, I have no way of telling what this is supposed to mean. Running the NXP-NCI2.0 example. NCI >> 20 00 01 01 NCI << 40 00 01 00 NCI << 60 00 09 02 01 20 04 04 71 12 50 05 NCI >> 20 01 02 00 00 NCI << 40 01 1e 00 1a 7e 06 03 01 d0 02 ff ff 01 ff 00 08 00 00 01 00 02 00 03 00 80 00 82 00 83 ... NCI >> 2f 00 01 00 NCI << 4f 00 01 00 NCI >> 20 02 05 01 00 02 fe 01 NCI << 40 02 02 00 00 NCI >> 20 03 03 01 a0 14 NCI << 40 03 25 00 01 a0 14 20 57 65 64 20 4d 61 72 20 31 32 20 31 34 3a 33 30 3a 30 35 20 32 30 ... NCI >> 20 00 01 00 NCI << 40 00 01 00 NCI << 60 00 09 02 00 20 04 04 71 12 50 05 NCI >> 20 01 02 00 00 NCI << 40 01 1e 00 1a 7e 06 03 01 d0 02 ff ff 01 ff 00 08 00 00 01 00 02 00 03 00 80 00 82 00 83 ... NCI >> 2f 02 00 NCI << 4f 02 05 00 00 01 aa dd NCI >> 21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80 NCI << 41 00 01 00 NCI >> 21 03 07 03 00 01 01 01 06 01 NCI << 41 00 01 00 00 01 aa dd 01 d0 Error: cannot start discovery Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK More context on the hang up: The program seems to get hung up in NxpNci_WaitForReception() function. I suppose this is due to not acknowledging the NFC tag. I've tried reading from multiple type 2 and type 5 tags and none seem to be recognized. Is this reader only compatible with specifically formatted tags? Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK Hello @KaiLi, I momentarily switched over to one of the recommended platforms (LPC824) to see how it's expected to work and I've run into a couple of issues... Sometimes the program fails on the last command before discovery. On successful start of discovery, the device goes into an infinite loop inside of NxpNci_WaitForDiscoveryNotification() and never drops into the polling loop for card type. Please see attached debug log. Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK Hello @shalom_greene  uint8_t NxpNci_CORE_STANDBY[]={0x2F, 0x00, 0x01, 0x00}; /* last byte indicates enable/disable */ 0x00: disable Standby 0x01: enable standby Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK Hello @shalom_greene  If you want to make sure the PN7160 is not in standby mode, you can configure it as follows: /* NXP-NCI standby enable setting * Refer to NFC controller User Manual for more details */ uint8_t NxpNci_CORE_STANDBY[]={0x2F, 0x00, 0x01, 0x00}; /* last byte indicates enable/disable */ Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK Here's an updated, formatted image of the code snippet.   Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK @KaiLi, Thanks for sharing the expected data from the example. I was able to modify the TML file enough to confirm the results of the NxpNci_CheckDevPres() function. I seem to get that data back fine, but then fail on the next command of NxpNci_HostTransceive(). It returns with no data. Initially, I thought that I needed a longer wait period for the data to be ready and IRQ to generate, but the IRQ signal remains low indefinitely after sending the NCICoreInit_2_0 (0x20, 0x01, 0x02, 0x00, 0x00) command. Also, sometimes I notice that the data seems buffered or delayed from the PN7160. This seems to occur when the system comes up with the IRQ already high. I expect that the reset toggle on the VEN pin should set the IRQ back low, but it doesn't always do so.  Here is the data transaction that I'm getting.   I have to note here that I had to modify the tml_Receive() function to get this to work this far. And the system still only seems to work when using non-blocking I2C transfer functions. Here's the code snippet for the receive function that I modified: void tml_Receive(uint8_t *pBuffer, uint16_t BufferLen, uint16_t *pBytes, uint16_t timeout) { PRINTF("\n\r*** New Read Triggered! ***\n\r"); //clear out buffer memset(pBuffer,0x00,BufferLen*sizeof(uint8_t)); //Sleep(300); tml_WaitForRx(timeout*10); //currently discarding error Status ret = tml_Rx(pBuffer, BufferLen, pBytes); PRINTF("\n\rtml_Rx status: %i, buffer length: %i\n\r", ret, *pBytes); PRINT_BUF("\n\r***Current Buffer Content: ", pBuffer, *pBytes); if ((GPIO_PinRead(BOARD_NXPNCI_IRQ_GPIO, BOARD_NXPNCI_IRQ_PIN) == 1)) { PRINTF("\n\r*** IRQ still asserted! More data to read... ***\n\r"); PRINT_BUF("\n\r**BEFORE RETRY*** NCI << ", pBuffer, *pBytes); if (ret == SUCCESS) { PRINTF("\n\r*** Attempting to read remaining data. ***\n\r"); if(INTF_READ(&pBuffer[*pBytes], pBuffer[2]) == kStatus_Success) { *pBytes = *pBytes + ((pBuffer[2] + 3) - *pBytes); } else { PRINTF("\n\r*** Failed to read additional bytes ***\n\r"); } } else { PRINTF("\n\r*** tml_Rx Failed initial read. Attempting to retry read with INTF_READ. ***\n\r"); if(INTF_READ(&pBuffer[*pBytes], pBuffer[2]) == kStatus_Success) { *pBytes = pBuffer[2] + 3; } else { PRINTF("\n\r*** Failed to read additional bytes ***\n\r"); } } PRINT_BUF("**AFTER RETRY*** NCI << ", pBuffer, *pBytes); } PRINTF("\n\rtml_Rx status: %i, buffer length: %i\n\r", ret, *pBytes); PRINT_BUF("\n\r***Current Buffer Content: ", pBuffer, *pBytes); } Please also see log attached with some debug output. Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK I realized that I didn't have the logic analyzer grounded. So, once I sync'd the grounds, I no longer see the glitch. So, I'm back to seeing data transmitted with ACK on each byte, but no IRQ or data generated by the PN7160. So, my question still stands on how to ensure that the PN7160 is not in standby mode. Feedback on the OM27160 devkit: It would be nice to have some LEDs to know status of the HW (i.e. RX/TX data being received/sent and an indicator for standby vs active mode). Right now, there is no way to tell what mode it's in and the WUP_REQ pin that is suggested for forcing the PN7160 out of standby is a NC according to the schematics.     Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK Hello @KaiLi, Thanks for the quick reply. I understand that there is an issue with the I2C communication. I just can't figure out what exactly is wrong. I've switch from using FLEXIO_I2C to use LPI2C via LP_Flexcomm, but I get the same results. When using the blocking transfer function, transmission aborts due to shifter error status flags. When using nonblocking transfer functions, I can see the data being transmitted out, but I get no reply form the PN7160. I see that the data being transmitted is being acknowledged by the PN7160 device, but I'm not getting a response when trying to receive. The User Manual documentation for PN7160 says to wait for the IRQ pin to go high before requesting data. I see it go high, but it's in the middle of the data transfer. There is a function tml_Rx() in the NXPNCI Library that waits for this pin to go high but fails due to timeout. The pin only remains high for about 160ns, and seems to coincide with a glitch in the clock signal. So, the function aborts before attempting to read due to missing the interrupt. This occurs while sending the NCICoreReset command. Is this command expected to return any data? Also, I assume that the fact that I'm getting ACKs back from the PN7160 means that it's alive, but how do I confirm that it's not in standby mode? I read that if the device is in standby mode, it will not respond Here is the data that I've captured on a logic analyzer using the non-blocking transfer functions:           Re: Trouble getting NXPNCI Library to work with an MCXN236 MCU and OM27160A1EVK Hello @shalom_greene  The problem should be in the porting of I2C driver , so you need to check whether the I2C communication is correct between MCU and PN7160.  Also, you can refer to the section 12.1 of AN13892 (https://www.nxp.com.cn/docs/en/application-note/AN13892.pdf) and trigger the NCI log to see what happened on your side. 
View full article
ls1028ardb DDRとpinmuxの設定、参照ファイルを変更しますか? カスタムボードの準備として、LS1028ARDBボードのDDR設定とピンマックスを変更しようとしています。 私の最初の目標は、メモリのECCを無効にすることです(起動時間を短縮するため)。 どうやら、これを行う方法はcodewarriorを使用することです。 私はこれらのことのためのプロジェクトを作成する方法を見つけることができました。しかし、私が見つけることができないのは、ボードの設定の参照です。LS1028ARDBボードにすでに正しい設定から始めることができると、はるかに便利です。 そのようなファイルはありますか? あるいは、codewarrior は、メモリダンプからこれらをロードするオプションを提供します。しかし、例えば、レジスタの内容を "md" を使って u-boot にダンプした後、これらを codewarior にロードした後の結果は全くのインチキです。codewarriorが望むファイルの作成方法を説明するドキュメントはまったくないようです。 Re:ls1028ardbはDDRとpinmuxの構成、参照ファイルを変更しますか? それはいくらか機能しました。 codewarrior からヘックスダンプを作成しました。読み返してみましたが、うまくいきます。 すでに作成したu-bootメモリダンプを取得し、それをhexdumpと同じ形式に変換するPythonスクリプトを書きました。 このファイルは受け入れます。DDR設定が生成され、ATFで使用できない不要なファイルが作成されます。 変更を加え、再度生成しました。差分ツールを使用してファイルを比較し、それらの変更を手動で ATF コードに修正しました。 Re:ls1028ardbはDDRとpinmuxの構成、参照ファイルを変更しますか? 私は動作する画像とソフトウェア、Yoctoとすべてを持っています、私はそれを探していません。また、Yoctoから物を構築するときにDDRが完全に正常に機能することも十分に認識しています。 私はあなたが提供したリンクをぐるぐる回っていますが、私が探しているものに遠く似たものの痕跡はありません。 私は、CodeWarriorにフィードして、LS1028ARDBのDDRコードを作成できるものを探しています。 私はメモリダンプ(u-bootからさまざまな形式)を試しましたが、codewarriorはそれらを受け入れず、形式について文句を言います。 Re:ls1028ardbはDDRとpinmuxの構成、参照ファイルを変更しますか? 私はあなたが提供したリンクをぐるぐる回っていますが、私が探しているものに遠く似たものの痕跡はありません。 私は、CodeWarriorにフィードして、LS1028ARDBのDDRコードを作成できるものを探しています。 私はメモリダンプ(u-bootからさまざまな形式)を試しましたが、codewarriorはそれらを受け入れず、形式について文句を言います。 Re:ls1028ardbはDDRとpinmuxの構成、参照ファイルを変更しますか? 私の質問は、実用的なリファレンスを取得することでした。 LS1028を選択すると、デフォルトで表示されるDDR構成がLS1028ARDBボードと一致しません。明らかな違いの 1 つは、ECC がオフになっていることです。 私が欲しいのは、LS1028ARDBの設定を持つことです。 あとは自分で理解できると思います。
View full article