Multi Source Translation Content

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

Multi Source Translation Content

ディスカッション

ソート順:
I2C baudrate issue - S32K344 MCU Hello everyone, I would like to know why in the LPI2C example code (I2c_IP_LPI2C_Transfer_S32K344) the baudrate configuration is this: Note: I'm using S32K3 RTD AUTOSAR 4.4 2.0.1 D2207. But the result is: The frequency is 125KHz, is it correct? Shouldn't it be 208333Hz as the configuration? Can you please provide me the formula to find the baudrate? The pullup that I'm using in my custom board is 100K, I don't know if it is the reason. Thank you, MVR Re: I2C baudrate issue - S32K344 MCU Hi @MVR, The user manual describes the calculation for I2C baud rate in S32 Config Tools. The reference manual defines the SCL period. You can refer to the I2C User Manual for the baud rate parameter instead. Best regards, Julián Re: I2C baudrate issue - S32K344 MCU Hey @Julián_AragónM , I followed this table and it was not matching with the baudrate final on S32DS. I found the user manual and I could see a different formula: This formula match with the final result. Which formula should I use? I used this file: UM34I2CASR4.4 Rev0000R2.0.0 Rev. 1.0 Re: I2C baudrate issue - S32K344 MCU Hi @MVR, You can find how the timing parameters are calculated from Table 452. from the S32K3xx Reference Manual (Rev. 9), as well as the timing parameter restrictions: Chapter 71.6 (Application information) also proves useful for example timing configurations: Please keep in mind that actual baud rate depends on the SCL rise time, which does depend on the external pullup resistor values and bus loading. If communication is working, the actual speed should be no issue. Best regards, Julián
記事全体を表示
Mcl_Trgmux_Group Hi, Mcl_Trigger Mux Group was there  in that Group From TRGMUX_IP_INPUT_EMIOS1_IPP_ 0 to 15 ,22 and 23. If i want Select the Trgmux_Logic_trigger Hardware Input of emios channel to Hardware Out of Lcu0. currently Im using Emios Channel number 21,22. So which Trgmux Logic Trigger Input i need to select for channel num 21 and 22. Re: Mcl_Trgmux_Group Hi @Senlent, Thank u For Ur Quick Response towards the the Solution. It doesn't mean that NXP , It mean Each Emios Instance Have 24 Channels, So if U see the TRGMUX Connectivity 0 to 15,22,and 23 channels only in TRGMUX logic Group. If i use Emios Out of 23 channels why 16 to 21 channels Input not Available in that Option. . Re: Mcl_Trgmux_Group Hi@gadilinga "But That Channel Suggested NXP only." what does it mean? Can you show me a screenshot? Re: Mcl_Trgmux_Group Hi @Senlent, But That Channel Suggested NXP only. Re: Mcl_Trgmux_Group Hi@gadilinga This is not a problem. eMIOS's CH21 cannot be used as the input of TRGMUX. What you can do is to change other channels. Re: Mcl_Trgmux_Group Hi @Senlent, Currently I'm using Emios0_Ch[0],Emios0_Ch[1], Emios1_Ch[6],Emios1_Ch[7],Emios1_Ch[21 And Emios1_Ch[22] these 6 channel using For Pwm. i need Each channel Emios Input Trigger Mux AS for NXP Application:AN13767 :S32K344 module interconnection Diagrams. for Got 5 channels But 21 I didn't get So As u mention Above comment. what was Solution for This Problem. Re: Mcl_Trgmux_Group Hi@gadilinga Actually you can see what channel can be used in TRGMUX. and EMIOS_0_IPP_DO_eMIOS_CH[21] can not be used for TRGMUX input.
記事全体を表示
LPSPI for SPI-adc and SPI-dac for IMXRT1176 Hi team, We are using external SPI related ADC and DAC for our project. Which is better approach for establishing communication with SPI protocol (interrupt or polling) because we need only SPI transmission for DACs Re: LPSPI for SPI-adc and SPI-dac for IMXRT1176 Hi @Jeevan, Yes, it can still work. Just make sure to initialize the appropriate pin and configure it during the SPI initialization.  In the case of the lpspi_interrupt_b2b_transfer_slave_cm7 example code from the SDK, you can achieve this by changing "slaveConfig.whichPCS" value from kLPSPI_Pcs0 to kLPSPI_Pcs1: BR, Edwin. Re: LPSPI for SPI-adc and SPI-dac for IMXRT1176 Hi @EdwinHz , Thank you for your valuable information. Just had one query. Will the SPI communication work from eval board to eval board if chip select 0 selected on one board and chip select 1 selected on another board. Board connection: Eval board 1 <--> Eval board 2 CS0 <-> CS1 Clock <-> Clock MOSI <-> MISO MISO <-> MOSI GND <-> GND Re: LPSPI for SPI-adc and SPI-dac for IMXRT1176 Hi @Jeevan, SPI polling would be a simpler solution, but it can also require a much higher load of work on the CPU. Interrupt increases the complexity of the transmissions but is much better for performance in the CPU. I would depend on how often you expect an ADC/DAC conversion, and how "real-time" you want this conversion to be processes, but I would recommend using the interrupt method, and basing your code on the example project we provide in our SDKs. BR, Edwin.
記事全体を表示
S32K144: CAN0 and CAN1 communication lost after some packet I use one S32K144 EVB's CAN0 and CAN1 to complete CAN's Tx and Rx. The code is based Demo_CAN_S32K144 project. CAN0 send a 8 bytes frame to CAN1, CAN1 receive the frame and verify if this frame is desired packet. If yes, change CAN-ID and send same frame to CAN0. When CAN0 receiver CAN1's reply frame, verify to see if it is the desired frame. If yes, CAN0 send next frame to CAN1, CAN1 receive the frame and verify it...... At first, the code process soomthly. But CAN0/CAN1 tx/rx run about send 5000+ frame, the CAN0 send a frame without a data content. The communication procedure stop. The can device USBCANFD show the last frame is a remote frame, but I don't send remote frame in code. I don't know it is a remote frame or a false frame without frame content.  I attach the last data's waveform and USBCAN device's data log. Thanks. Re: S32K144: CAN0 and CAN1 communication lost after some packet Thank you. My version is S32DS for ARM 2.2. Just now I found the root cause and resolve method in website. The Rx_buffCfg/Tx_buffCfg structure can't be set as a local variable in CAN0_Init()/CAN1_Init(), they should be set as gloabl variable. For detail, please find chapter 3.3 in the link https://blog.csdn.net/tao475824827/article/details/106757092 Re: S32K144: CAN0 and CAN1 communication lost after some packet Hi, you did not specify SDK version you have.  Note there was some driver fixes over the time, so be sure to have latest one. BR, Petr Re: S32K144: CAN0 and CAN1 communication lost after some packet I runn the code and find in CAN0_Callback_Func()/CAN1_Callback_Func() functions,  the CAN_Receive() always return STATUS_BUSY, not STATUS_SUCCESS. Maybe that's the root cause. But I don't know why this condition happens, can anyone give me some explaination? Thanks. Re: S32K144: CAN0 and CAN1 communication lost after some packet I attach the main() function code below: #define LED1(x)  PINS_DRV_WritePin(PTA,1,!x);//RED #define LED2(x)  PINS_DRV_WritePin(PTB,8,!x);//GREEN #define LED3(x)  PINS_DRV_WritePin(PTB,9,!x);//BLUE   can_message_t canX_Tx_msg[10] = { {.cs = 0U, .id = 0x06, .data = "01234567", .length = 8}, {.cs = 0U, .id = 0x06, .data = "12345678", .length = 8}, {.cs = 0U, .id = 0x06, .data = "23456789", .length = 8}, {.cs = 0U, .id = 0x06, .data = "34567890", .length = 8}, {.cs = 0U, .id = 0x06, .data = "45678901", .length = 8}, {.cs = 0U, .id = 0x06, .data = "56789012", .length = 8}, {.cs = 0U, .id = 0x06, .data = "67890123", .length = 8}, {.cs = 0U, .id = 0x06, .data = "78901234", .length = 8}, {.cs = 0U, .id = 0x06, .data = "89012345", .length = 8}, {.cs = 0U, .id = 0x06, .data = "90123456", .length = 8},  };     #define Rx_Filter  0x0 char IRQ_CAN0_RX = 0; char IRQ_CAN1_RX = 0; char IRQ_CAN2_RX = 0; char IRQ_CAN0_RX_SUCC = 0; char IRQ_CAN1_RX_SUCC = 0; char IRQ_CAN2_RX_SUCC = 0;   uint32_t can0_tx_total_cnt = 0; uint32_t can0_rx_total_cnt = 0; uint32_t can0_rx_succ_cnt = 0; uint32_t can0_rx_fail_cnt = 0;   uint32_t can1_tx_total_cnt = 0; uint32_t can1_rx_total_cnt = 0; uint32_t can1_rx_succ_cnt = 0; uint32_t can1_rx_fail_cnt = 0; can_message_t recvMsg_CAN0; can_message_t recvMsg_CAN1; can_message_t recvMsg_CAN2;   #define RX_MAILBOX_CAN0  (0UL) #define TX_MAILBOX_CAN0  (1UL)   #define RX_MAILBOX_CAN1  (2UL) #define TX_MAILBOX_CAN1  (3UL)   #define RX_MAILBOX_CAN2  (4UL) #define TX_MAILBOX_CAN2  (5UL)     void can_normal_en(int canSn) { if(canSn == 0) { PINS_DRV_ClearPins(PTD, 1 << 9); }   if(canSn == 1) { PINS_DRV_ClearPins(PTB, 1 << 4); }   if(canSn == 2) { PINS_DRV_ClearPins(PTC, 1 << 11); } }   void can_silent_en(int canSn) { if(canSn == 0) { PINS_DRV_SetPins(PTD, 1 << 9); }   if(canSn == 1) { PINS_DRV_SetPins(PTB, 1 << 4); }   if(canSn == 2) { PINS_DRV_SetPins(PTC, 1 << 11); } }     /*CAN0回调函数*/ void CAN0_Callback_Func (uint32_t instance,can_event_t event,uint32_t buffIdx,void *flexcanState) { (void)flexcanState; //此处防止警报 (void)instance; (void)buffIdx; if(CAN_Receive(&can_pal0_instance, RX_MAILBOX_CAN0, &recvMsg_CAN0) == STATUS_SUCCESS)//接收报文并重新注册回调函数 IRQ_CAN0_RX_SUCC = 1; else IRQ_CAN0_RX_SUCC = 0;   switch(event) //回调事件 { case CAN_EVENT_RX_COMPLETE: //接收完成事件 IRQ_CAN0_RX = 1; break; case CAN_EVENT_TX_COMPLETE: //发送完成事件 break; default: break; } }   void CAN1_Callback_Func (uint32_t instance,can_event_t event,uint32_t buffIdx,void *flexcanState) { (void)flexcanState; (void)instance; (void)buffIdx; if(CAN_Receive(&can_pal1_instance, RX_MAILBOX_CAN1, &recvMsg_CAN1) == STATUS_SUCCESS)//接收报文并重新注册回调函数 IRQ_CAN1_RX_SUCC = 1; else IRQ_CAN1_RX_SUCC = 0;   switch(event) { case CAN_EVENT_RX_COMPLETE: IRQ_CAN1_RX = 1; break; case CAN_EVENT_TX_COMPLETE: break; default: break; } }     void CAN2_Callback_Func (uint32_t instance,can_event_t event,uint32_t buffIdx,void *flexcanState) { (void)flexcanState; (void)instance; (void)buffIdx; if(CAN_Receive(&can_pal2_instance, RX_MAILBOX_CAN2, &recvMsg_CAN2) == STATUS_SUCCESS)//接收报文并重新注册回调函数 IRQ_CAN2_RX_SUCC = 1; else IRQ_CAN2_RX_SUCC = 0; switch(event) { case CAN_EVENT_RX_COMPLETE: IRQ_CAN2_RX = 1; break; case CAN_EVENT_TX_COMPLETE: break; default: break; } }     void CAN0_Init(void) { CAN_Init(&can_pal0_instance, &can_pal0_Config0); can_buff_config_t Rx_buffCfg =  {       .enableFD = false,       .enableBRS = false,       .fdPadding = 0U,       .idType = CAN_MSG_ID_STD,       .isRemote = false };   can_buff_config_t Tx_buffCfg =  {       .enableFD = false,       .enableBRS = false,       .fdPadding = 0U,       .idType = CAN_MSG_ID_STD,       .isRemote = false }; CAN_ConfigRxBuff(&can_pal0_instance, RX_MAILBOX_CAN0, &Rx_buffCfg, Rx_Filter); //注册接收配置和MSGID过滤器(如过滤器配置为0x1,则只接受msgid 0x1发来的报文) CAN_ConfigTxBuff(&can_pal0_instance, TX_MAILBOX_CAN0, &Tx_buffCfg); //配置发送 /*设置MSGID的掩码,掩码粗略可以理解为对11bit MSGID地址的过滤 如果某bit位需要过滤设置为1,不过滤设置为0,例如掩码设置为0x7ff则过滤全部标准id,如果设置为0x7fe,这只能接受0x01的报文(不存在0x0的地址)*/ CAN_SetRxFilter(&can_pal0_instance,CAN_MSG_ID_STD,RX_MAILBOX_CAN0,0); //设置MSGID掩码, CAN_InstallEventCallback(&can_pal0_instance,&CAN0_Callback_Func,(void*)0); //注册回调函数 CAN_Receive(&can_pal0_instance, RX_MAILBOX_CAN0, &recvMsg_CAN0); //*****重点****此函数不只有接收作用 还有续订回调函数的作用. }     void CAN1_Init(void) { CAN_Init(&can_pal1_instance, &can_pal1_Config0); can_buff_config_t Rx_buffCfg =  {       .enableFD = false,       .enableBRS = false,       .fdPadding = 0U,       .idType = CAN_MSG_ID_STD,       .isRemote = false };   can_buff_config_t Tx_buffCfg =  {       .enableFD = false,       .enableBRS = false,       .fdPadding = 0U,       .idType = CAN_MSG_ID_STD,       .isRemote = false }; CAN_ConfigRxBuff(&can_pal1_instance, RX_MAILBOX_CAN1, &Rx_buffCfg, Rx_Filter); CAN_ConfigTxBuff(&can_pal1_instance, TX_MAILBOX_CAN1, &Tx_buffCfg); CAN_SetRxFilter(&can_pal1_instance,CAN_MSG_ID_STD,RX_MAILBOX_CAN1,0); CAN_InstallEventCallback(&can_pal1_instance,&CAN1_Callback_Func,(void*)0); CAN_Receive(&can_pal1_instance, RX_MAILBOX_CAN1, &recvMsg_CAN1); }   void CAN2_Init(void) { CAN_Init(&can_pal2_instance, &can_pal2_Config0); can_buff_config_t Rx_buffCfg =  {       .enableFD = false,       .enableBRS = false,       .fdPadding = 0U,       .idType = CAN_MSG_ID_STD,       .isRemote = false };   can_buff_config_t Tx_buffCfg =  {       .enableFD = false,       .enableBRS = false,       .fdPadding = 0U,       .idType = CAN_MSG_ID_STD,       .isRemote = false }; CAN_ConfigRxBuff(&can_pal2_instance, RX_MAILBOX_CAN2, &Rx_buffCfg, Rx_Filter); CAN_ConfigTxBuff(&can_pal2_instance, TX_MAILBOX_CAN2, &Tx_buffCfg); CAN_SetRxFilter(&can_pal2_instance,CAN_MSG_ID_STD,RX_MAILBOX_CAN2,0); CAN_InstallEventCallback(&can_pal2_instance,&CAN2_Callback_Func,(void*)0); CAN_Receive(&can_pal2_instance, RX_MAILBOX_CAN2, &recvMsg_CAN2); }     int main(void) { int MCU_Freq; int sendGap = 200; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ #ifdef PEX_RTOS_INIT     PEX_RTOS_INIT();                   /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */ #endif   /*** End of Processor Expert internal initialization.                    ***/   CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT); CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT); MCU_Freq = delay_init();//初始化delay函数 PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr); //初始化IO   CAN0_Init(); CAN1_Init(); CAN2_Init();   FLEXIO_UART_init(); /*! Initialize Timer 0, Shifter 0 to emulate * an UART transmitter instance, using: * FXIO_D2 to generate baud-rate (output disabled). * FXIO_D1 as output shifter pin. */   FLEXIO_100KHz_PWM_init(50); /*! Initialize Timer 1 and FXIO_D0 to emulate PWM. */ FLEXIO_UART("CAN_TX_RX_Demo. MCU Run Frequency is %d Mhz \r\n",MCU_Freq);   can_normal_en(0); can_normal_en(1); can_normal_en(2); CAN_Send(&can_pal0_instance, TX_MAILBOX_CAN0, &canX_Tx_msg[can0_tx_total_cnt%10]); delay_us(sendGap);     while(1)     { if (IRQ_CAN0_RX)//如果接收到CAN报文会通过串口打印出来 //if(1) { IRQ_CAN0_RX = 0; if(IRQ_CAN0_RX_SUCC) //if(1) { if(strcmp((char *)recvMsg_CAN0.data, (char *)canX_Tx_msg[can0_tx_total_cnt%10].data) == 0) //if(1) { delay_us(sendGap); IRQ_CAN0_RX_SUCC = 0; can0_tx_total_cnt++; CAN_Send(&can_pal0_instance, TX_MAILBOX_CAN0, &canX_Tx_msg[can0_tx_total_cnt%10]); delay_us(sendGap); } else can0_rx_fail_cnt++; } else can0_rx_fail_cnt++;   if(can0_tx_total_cnt%1000 == 0) { FLEXIO_UART("Transmit sendGap=%dus,TxCnt=%d,LastData=<%s>\r\n",sendGap,can0_tx_total_cnt,canX_Tx_msg[can0_tx_total_cnt%10].data); } }   if (IRQ_CAN1_RX)//如果接收到CAN报文会通过串口打印出来 { IRQ_CAN1_RX = 0; can1_rx_total_cnt++; if(IRQ_CAN1_RX_SUCC) { if(strcmp((char *)recvMsg_CAN1.data, (char *)canX_Tx_msg[can0_tx_total_cnt%10].data) == 0) { delay_us(sendGap); IRQ_CAN1_RX_SUCC = 0; can1_rx_succ_cnt++; recvMsg_CAN1.id = 0x08; CAN_Send(&can_pal1_instance, TX_MAILBOX_CAN1, &recvMsg_CAN1); delay_us(sendGap); } else can1_rx_fail_cnt++; } else can1_rx_fail_cnt++;   if(can1_rx_total_cnt%1000 == 0) { FLEXIO_UART("Receive sendGap=%dus,RxCnt=%d,FailCnt=%d,LastData=<%s>\r\n",sendGap,can1_rx_total_cnt,can1_rx_fail_cnt,recvMsg_CAN1.data); } }     }   /*** Don't write any code pass this line, or it will be deleted during code generation. ***/   /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/   #ifdef PEX_RTOS_START     PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */   #endif   /*** End of RTOS startup code.  ***/   /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/   for(;;) {     if(exit_code != 0) {       break;     }   }   return exit_code;   /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/ } /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
記事全体を表示
Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef Hello, all the example codes use for loops for their delay functions and I do not know how reliable these would be. https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/td-p/1946299 However I am unable to actually add a value instead it gives me a blank drop down menu. If I end up needing to use the simple for loop + counter method, there is a bit of confusion I have there too.  The internal clock of the mcu 48MHz or 16MHz? I thought this delay function was supposed to be 1 second flickering but it would be either 0.1 or 0.3 respectively. I want to convert my delay function to miliseconds for usability reasons but I can not really tell what my "base clock" I am working off of even is.  Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef Hi @pb632146  I'm glad that the information helped. By updating the RTD version, I strongly suggest to check your applications configurations, since the location of certain configuration fields and/or definitions may change and the code will not compile. - RomanVR. Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef The clock works correctly now thank you! Are there any issues that I might run into by uninstalling RTD and replacing it in my current environment? Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef Hi @pb632146  Apologies for my typo in the formula. You are correct, it will convert ticks to seconds. Therefore, you can just multiply by 1,000,000 or divide the ticks by 160 just as you mention. To update to RTD 5.0.0, you must first uninstall the RTD 3.0.0 and then download the updatesite of version 5.0.0. Below is a step-by-step guide to assist you: Uninstalling RTD 3.0.0: In the "S32DS Extensions and Updates" menu, locate and select every package related to RTD 3.0.0. Click the uninstall button to remove them. To confirm the uninstallation, check that the packages no longer appear in the Installation Details menu, located above the Cancel button.   Downloading and Installing RTD 5.0.0: Go to "Automotive SW - S32K3/S32M27x - Real-Time Drivers for Cortex-M". Select "S32K3_S32M27x Real-Time Drivers ASR R21-11 Version 5.0.0" and download the zip file named: "SW32K3_S32M27x_RTD_R21-11_5.0.0_D2410_DesignStudio_updatesite". Open your S32DS Extensions and Updates Menu and click on "Add Update Sites". Once added, the update site will be available for installation under the list of available packages. Code Update: Please replace the following line of code with: "Clock_Ip_Init(&Mcu_aClockConfigPB_BOARD_InitPeripherals[0]);" This how the clock configuration structure is defined in your project. Let me know if this helps and if you have more doubts. - RomanVR. Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef I only want to convert ticks to micro/mili/seconds not change the clock frequency so the formula confirmation is appreciated, but wouldn't that formula  convert ticks to seconds not microseconds since MHz is cycles per second.  Basically if I have 160Mhz then : 160 ticks = 1us, 160 * 1000 = 1ms, and 160 * 1000 * 1000 = 1 second correct?  I am on S32DS 3.5 but my rtd only appears to be version 3.0.0? I do not see any way to update to 5.0.0 Also Clock_Ip_Init(&Mcu_aClockConfigPB[0]); previously worked but now does not as it sees mcu_aclockconfigpb as undeclared and I do not know what changed I have attached my project folder though I do not know how to export my entire  development environment settings to help further. Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef Hi @pb632146  Due to the fact that your MCU is configured with the PLL Clock (160MHz), I recommend adding the following line to your code: Clock_Ip_Init(&Mcu_aClockConfigPB[0]); Additionally, ensure you include "Clock_Ip.h" library. this will update the clock reference for all the MCU modules and registers. Regarding your question: "While the code offer microseconds to ticks, to get the other way around I would want to convert the 160MHz to 1MHz so just divide by 160 correct?"  If you want to convert ticks to microseconds, you can do this by the following equation:   considering a clock frequency of 160MHz. If you want to change your clock frequency to 1MHz you need to adjust the clock  dividers as shown in the image below: However, I recommend not to do this if you need the MCU for high speed applications. Also you can refer to the Chapter 24 of the S32K3XX Reference Manual to check the maximum clock ratings of each S32K3 device. To enable the OsIf System Timer Clock Frequency to avoid adding the MCU driver, you can find it under the OsIfSystemTimerClockFreq if in Design Studio 3.5 with RTD 5.0.0 Please also share with us your development environment (Design Studio, RTD, etc.) to assist you further. Sometimes the location of certain fields may change depending on the RTD and/or the Design Studio version. Please let me know if this helps and if you have more doubts. - RomanVR. Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef While the code offer microseconds to ticks, to get the other way around I would want to convert the 160MHz to 1MHz so just divide by 160 correct? Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef I did add the MCU unit just to test the clock but running the sample code with 1000ms delay it toggles the led every 3 seconds instead of 1. What could be causing this? Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef I am realizing that I was supposed to add the instance of "OsIfTimerClockFreq" if I did not want to add the MCU layer, but where do I enable that? I do not see it as an available dropdown. Or is that something not available anymore? Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef Hi @pb632146. The test delays used in examples are primarily for demonstration purposes and but are not recommended for final implementations as they are blocking, and their theoretical delay value are only rough estimates. As mentioned in the community post, to add the Osif System Timer Clock Reference,  you need to include the Mcu module in the MCAL. Alternatively, instead of adding a System Timer Clock Reference, you can directly use the Timer Clock Frequency, which is by default of 48MHz on the S32K344 device. Additionally, I suggest to refer to the S32K3xx Reference Manual available at S32K3 Microcontrollers for Automotive General Purpose to check  the default system clock frequency and the available clock sources for each S32K3 device. Regarding the delay you mentioned, a delay with a value of 4,800,000 with the 48MHz internal clock would theoretically result in a delay > 0.1 seconds. However, this value will be always bigger since instructions take more than one clock cycle to execute. For better accuracy, I suggest to use the Osif functions available by including Osif.h library to your project once configured as seen on the community post you shared, where you can find a blocking delay function with a better precision. If you are interested in measuring your program’s runtime more accurately, you can configure a timer with a known value, increment a counter on each interrupt, and use this to estimate the runtime. Alternatively, you can toggle a GPIO pin at the start and end of the section you wish to measure and then observe the duration of the signal with an oscilloscope. Please let me know if you have more doubts. - RomanVR. Re: Delay function with and without OsIf? How do I enable OsIfSystemTimerClockRef Actually how do I track non blocking how many miliseconds or seconds the current program has been running, or barring that just time/date stamps.
記事全体を表示
S32K344-How to implement [detect one bit errors without correction] Hello I saw the description in the following figure in the file [S32K3xx Safety Manual]. How is [detect one bit errors without correction] implemented? BestRegards, Simon Re: S32K344-How to implement [detect one bit errors without correction] Yes, correct. Re: S32K344-How to implement [detect one bit errors without correction] Hi @davidtosenovjan  So what this means is that the ECC for data is 1-bit correction. The ECC for address is 1-bit detection without correction? BestRegards, Simon Re: S32K344-How to implement [detect one bit errors without correction] In the RM, it is not explicitly defined which ECC SECDEC (single error correction, double error detection) variant is used, however it is clear that this code is capable to detect single bit error in the address. Re: S32K344-How to implement [detect one bit errors without correction] Hello Sorry, here is the picture I mentioned before. Re: S32K344-How to implement [detect one bit errors without correction] Could you point out which figure you have on your find?
記事全体を表示
MC56F83789 : The code is working while debug but not working the same code after falshing Hi, When the code Debug with MC56F83789 the logic is completely working but flashing the code the logic is not working as expected. Please look into this issue. @xiangjun_rong  Re: MC56F83789 : The code is working while debug but not working the same code after falshing Hi, I suppose that the MC56F83789 enters bootloader mode, so the application code is not executed. Because there is ROM bootloader for MC56F83xxx, so a question arise, how does the MC56F83xxx enter bootloader mode or execute code in flash directly. There are two structures in Flash_config.c to configure flash and ROM. (a). You can change below values to configure Flash, such as secure or not, backdoo r key, boot from ROM or not, etc. static const uint8_t _flash_config_field [] = /* NV_BACKKEY3: KEY=0xFF 0xFFU, /* NV_BACKKEY2: KEY=0xFF 0xFFU, /* NV_BACKKEY1: KEY=0xFF 0xFFU, /* NV_BACKKEY0: KEY=0xFF 0xFFU, /* NV_BACKKEY7: KEY=0xFF 0xFFU, /* NV_BACKKEY6: KEY=0xFF 0xFFU, /* NV_BACKKEY5: KEY=0xFF 0xFFU, /* NV_BACKKEY4: KEY=0xFF 0xFFU, /* NV_FPROT3: PROT=0xFF 0xFFU, /* NV_FPROT2: PROT=0xFF 0xFFU, /* NV_FPROT1: PROT=0xFF 0xFFU, /* NV_FPROT0: PROT=0xFF 0xFFU, /* NV_FSEC: KEYEN=1,MEEN=3,FSLACC=3,SEC=2 (Note: set SEC to 00b for secure) */ 0x7EU, /* NV_FOPT: FOPT[7:6] = 11b means boot from ROM, other value means boot from Flash */ 0x3FU, /* Reserved 0xFFU, /* Rese rved */ 0xFFU }; For the above red 0x3F data, it’s bit7 and bit6 are zero, it means the MC56F83xxx starts from Flash. If the data is changed to 0xFF, it means the MC56F83xxx starts from bootloader after Reset. Hope it can help you BR XiangJun Rong
記事全体を表示
I.MX8M PLUS and I.MX8QuadMax kits for using tensorflow-hub platform. How can i use tensorflow-hub platform on both of these boards. I am utilizing a deep learning model which is imported in the project through tensorflow-hub API. The tensorflow-Hub version that i am using in my project is tensorflow-hub==0.16.1. Please provide detailed procedure to use tensorflow hub on both of these kits. i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: I.MX8M PLUS and I.MX8QuadMax kits for using tensorflow-hub platform. Hi Please refer below guide. There is no support for tensorflow-hub https://www.nxp.com/docs/en/user-guide/IMX-MACHINE-LEARNING-UG.pdf Best Regards Zhiming
記事全体を表示
S32K396 DIO from example - LED D34 & 33 wrong default config??? Hello, I am using S32K396-BGA-DC1 board, with Simulink in matlab2024a. I am trying to re-use the example "s32k37x_s32k39x_dio_ebt" because I noticed that by default, the D33 & D34, are wrong configured in the example project (see fig. 1 & 2) Is that true? . After changing the .mex by adding the correct new channel and configuring it (see fig. 3 & 4), I cannot see the led blinking. I checked that the SW are working ok with freemaster. Can you please help me with this issue, I attached the modified project. Thanks, Agustin. Re: S32K396 DIO from example - LED D34 & 33 wrong default config??? Hi, @agus_idiada, The latest version of the S32K3 Toolbox (1.5.0) provides support for both XS32K396-BGA-DC and XS32K396-BGA-DC1, but in different ways. These are two different revisions of the S32K396 hardware board.  1. The first revision, XS32K396-BGA-DC, is used for the default project implementation of the S32K396-Q289 hardware board, inside the devices folder (toolbox_root\mbdtbx_s32k3\devices\S32K396-Q289). In this folder you can find the configuration of this specific hardware board revision, which has the LEDs routed to PTH7 (D35_BLUE), PTH8 (D34_BLUE) and PTH9 (D33_BLUE), as illustrated in your screenshot 2.png. 2. The second version, XS32K396-BGA-DC1, is a different board revision than the previous one, and which has a slightly different configuration. This revision's implementation is used as a custom configuration, and you can find it inside the custom_projects folder, under devices (toolbox_root\mbdtbx_s32k3\devices\custom_projects\XS32K396-BGA-DC1). In this folder you can find the configuration of this specific hardware board revision, which has the LEDs routed to PTH7 (D35_BLUE), PTD4 (D34_BLUE) and PTD5 (D33_BLUE), as illustrated in your screenshot 3.png. Regarding the custom project usage, the toolbox provides support for users to create their own custom default projects. This could be very useful when having a custom board design, or, as in our case, a different revision of the same board. For the applications delivered with the toolbox and newly created models, the Default Configuration Template will be set automatically to the location of the default project the toolbox provides, according to the selected Hardware Part and Configuration Tool. The Browse button will open the Windows Explorer allowing the selection of a different project to be used as the default one for the model. You can choose one of the projects delivered with the toolbox, or a different configuration you might have created. After you correctly set the custom configuration project, you can successfully use in your application.  Let us know if you have other issues. Best regards,  Dragos
記事全体を表示
IMX8QM-EVK android boot fail in android 12 bsp I built Android 12.0.0_2.0.0 (L5.15.32_2.0.0 BSP) for the IMX-8qm EVK board with the lunch configuration 82 (mek_8q_car-userdebug). Initially, the build was unsuccessful due to an out-of-space issue, which I resolved by changing the FILE_SYSTEM_TYPE from "ext4" to "erofs." After that, the build was successful. However, some of the .img files, such as init_boot.img and super.img, were missing from the out folder. We flashed the build using the following steps: adb reboot bootloader sudo ./fastboot_imx_flashall.sh -f imx8qm -a -d md -e sudo fastboot reboot The flashing process completed successfully, but after the fastboot reboot command, the device started displaying continuous logs indicating "starting kernel." The logs eventually ended with the error message: avb_slot_verify.c:700: ERROR: init_boot_b: Error loading footer. full log  ______________ Normal Boot Trying to boot from MMC1 Booting from bootloader_a... UU   boot args 0x2000000 0xfe000000 0x2000 0x0 initializing trusty (Project: imx8qm_a72, Built: 10:15:43 May 30 2022) Core:  180 devices, 28 uclasses, devicetree: separate MMC:   FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... *** Warning - bad CRC, using default environment [*]-Video Link 0 (1280 x 720)         [0] dpu@56180000, video         [1] lvds-channel@0, display         [2] lvds-to-hdmi-bridge@4c, video_bridge In:    serial Out:   serial Err:   serial BuildInfo:    - SCFW 8172eaea, SECO-FW c9de51c0, IMX-MKIMAGE a8bb8edb, ATF 44c44f0   - U-Boot 2022.04 flash target is MMC:0 Net:   eth0: ethernet@5b040000 [PRIME], eth1: ethernet@5b050000 INFO Initializing Trusty device INFO selected trusty api version: 3 (requested 3) INFO Initializing Trusty IPC device INFO Initializing RPMB storage proxy service INFO Initializing Trusty Keymaster client INFO Initializing Trusty Hardware Crypto client Fastboot: Normal Normal Boot Hit any key to stop autoboot:  0  Verifying slot _a ... Writing A/B metadata to disk. verify OK, boot 'boot_a' Kernel load addr 0x80280000 size 20122 KiB kernel   @ 80280000 (41943040) ramdisk  @ fc000000 (10910699) fdt      @ 82c00400 (137843) Moving Image from 0x80280000 to 0x80400000, end=82c00000 ## Flattened Device Tree blob at 82c00400    Booting using the fdt blob at 0x82c00400 ERROR: reserving fdt memory region failed (addr=901ff000 size=1000 flags=4) ERROR: reserving fdt memory region failed (addr=91f00000 size=100000 flags=0)    Using Device Tree in place at 0000000082c00400, end 0000000082c24e72 Fastboot: Normal Normal Boot Hit any key to stop autoboot:  0  Verifying slot _b ... fsl_read_from_partition_multi: no init_boot_b partition idx 0, ptn 0 name='gpt' start=0 len=2048 idx 1, ptn 0 name='' start=0 len=0 idx 2, ptn 0 name='all' start=0 len=62160896 idx 3, ptn 0 name='bootloader0' start=0 len=64512 idx 4, ptn 1 name='bootloader_a' start=16384 len=32768 idx 5, ptn 2 name='bootloader_b' start=49152 len=32768 idx 6, ptn 3 name='dtbo_a' start=81920 len=8192 idx 7, ptn 4 name='dtbo_b' start=90112 len=8192 idx 8, ptn 5 name='boot_a' start=98304 len=131072 idx 9, ptn 6 name='boot_b' start=229376 len=131072 idx 10, ptn 7 name='system_a' start=360448 len=3145728 idx 11, ptn 8 name='system_b' start=3506176 len=3145728 idx 12, ptn 9 name='system_ext_a' start=6651904 len=524288 idx 13, ptn 10 name='system_ext_b' start=7176192 len=524288 idx 14, ptn 11 name='misc' start=7700480 len=8192 idx 15, ptn 12 name='metadata' start=7708672 len=32768 idx 16, ptn 13 name='presistdata' start=7741440 len=2048 idx 17, ptn 14 name='vendor_a' start=7745536 len=1310720 idx 18, ptn 15 name='vendor_b' start=9056256 len=1310720 idx 19, ptn 16 name='product_a' start=10366976 len=3670016 idx 20, ptn 17 name='product_b' start=14036992 len=3670016 idx 21, ptn 18 name='userdata' start=17707008 len=9539584 idx 22, ptn 19 name='fbmisc' start=27246592 len=2048 idx 23, ptn 20 name='vbmeta_a' start=27250688 len=2048 idx 24, ptn 21 name='vbmeta_b' start=27254784 len=2048 avb_slot_verify.c:700: ERROR: init_boot_b: Error loading footer. From the log, it appears that the system first attempts to boot from bootloader_a multiple times. After that, it attempts to boot from bootloader_b, but no further serial logs are displayed, and the device remains in fastboot mode. Android i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus Re: IMX8QM-EVK android boot fail in android 12 bsp I have made a change in the BoardConfigCommon file change the system file type from ext4 to erofs After reverting that change build flash properly Re: IMX8QM-EVK android boot fail in android 12 bsp Hello, You can see the android 13 user guide: https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/217786/1/ANDROID_USERS_GUIDE.pdf Where it has a table with all partition and how it burn to your board. Regards Re: IMX8QM-EVK android boot fail in android 12 bsp Hello, Can you please elaborate the procedure. Also in the same board we could able to flash android 13 build successfully I have one query is 12.0.0_2.0.0 (L5.15.32_2.0.0 BSP) version support imx-8qm evk board ?? Re: IMX8QM-EVK android boot fail in android 12 bsp Hello, It looks like you are not installed the correct partition, erase everything in the sd and try to burn again the image and tested since it goes out of memory. Regards
記事全体を表示
S32G3 LLCE 1.0.9 Compatibility with RTD 5.0 Hi, According to the LLCE release notes, version 1.0.9 was tested on RTD 4.0.2. I’m wondering if it is compatible with RTD 5.0. Upgrading to RTD 5.0 would make the project incompatible with older versions, so if LLCE 1.0.9 doesn’t work with RTD 5.0, I’d prefer to avoid spending time upgrading and then having to downgrade later. Thanks, XD Re: S32G3 LLCE 1.0.9 Compatibility with RTD 5.0 Hello @XD, I have received updates related to you questions. The LLCE 1.0.9 has being officially tested with RTD 5.0.0. , you can check said information in the S32G Software Offering, please check table Integrated Software Bundle 2024.11. Please not this is a secure file, for which you will need to get access, for this please contact your FAE or NXP representative. Sorry for the misinformation I shared before. Best regards Re: S32G3 LLCE 1.0.9 Compatibility with RTD 5.0 Hi @alejandro_e , Thank you for your quick response. I appreciate it. Thanks, XD Re: S32G3 LLCE 1.0.9 Compatibility with RTD 5.0 Hello @XD, It is good to support you again. As you have seeing already, LLCE 1.0.9 (which is the latest version) was tested with RTD 4.0.2, so that is the officially supported version, although it may properly work with version 5.0.0, this has not being officially tested and therefore we do not have any document indicating if it is compatible or not. So I would recommend keeping version 4.0.2 since, as you said, migrating versions requires some workload and in the end it may be problematic for your project. Let me know if you have more questions about this topic.
記事全体を表示
MPC5777C - Detailed explanations about performance monitors Hello! I need to monitor a list of hardware events in the MPC5777C and I am having some trouble in understanding clearly the purpose of each performance monitor listed in the e200z7 core reference manual. The descriptions are very short and, sometimes, not clear enough. Is there any other document which give more detailed explanations about the events that the performance monitor counts, their applications, etc. Best regards, Matheus Re: MPC5777C - Detailed explanations about performance monitors There is presentation mentioning some changes between C90 (MPC56xx) and C55 (MPC57xx) implementation: https://www.nxp.com/docs/en/supporting-information/ftf-acc-F1184.pdf However MPC5777C (e200z759) uses older version of performance monitor as it is on predecessor devices. There is an appnote related to e200z760: https://www.nxp.com/docs/en/application-note/AN4341.pdf Mainly I would point out e200z759 core RM: https://www.nxp.com/webapp/Download?colCode=E200Z759N3CRM&location=null I am afraid no further documents exists.
記事全体を表示
PCIe工作模式 在 LS1023/43A 中,唯一的 PCIe 控制器似乎是 RootComplex。认为它不可能作为端点运行,这种想法正确吗? 回复:PCIe 操作模式 也许你可以参考https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors:QORIQ-ARM LS1046A、LS1088A、LS1028A怎么样? LS1046A参考手册 LS1088A参考手册 LS1028A参考手册 谢谢​ 回复:PCIe 操作模式 谢谢,我明白了。 LS系列中是否有可以同时在Root和End上运行的设备?它类似于 LS20 系列吗?
記事全体を表示
IW612 guard interval: What is the default setting? What is the default guard interval for IW612? Is it fixed value or a dynamically variable value? I tried to check the details using mlanutl, but could not find the corresponding command. Re: IW612 guard interval: What is the default setting? Thank you for your reply. Re: IW612 guard interval: What is the default setting? Dear @jun_1 , See below, please! -- For 802.11n/802.11ac, Guard Interval has 2 options: (1) long GI : 800ns (0.8us) , it is also call 'normal'  (2)short GI: 400ns (0.4us) -- For 802.11 ax, Guard Interval has 3 options: (1) long GI : 800ns (0.8us) , it is also call 'normal'  (2)double: 1600ns (1.6us) (3)quadruple: 3200ns (3.2us) -- Using mlanutl to get or set Guard Interval (1)Checking GI type In README_MLAN document, you can see descriptions on if short GI or normal is enabled or disabled , no concrete time (period) of the GUI, because the correspond time has been fixed in 802.11 spec, like above. So you only need to check whether long GI or short GI, etc is enabled. (2) For WiFi 6 setting please refer to 'txratecfg'  session, definitions are like below: For HE: 0 = 1xHELTF + GI0.8us 1 = 2xHELTF + GI0.8us 2 = 2xHELTF + GI1.6us 3 = 4xHELTF + GI0.8us if DCM = 1 and STBC = 1 4xHELTF + GI3.2us, otherwise. So you can get default GI value when loading WiFi driver is done using mlanutl tool. Thanks! Regards, weidong Re: IW612 guard interval: What is the default setting? Hi, @jun_1  Thanks for creating case to us. Let me check internally and feedback to you ASAP. Best regards, Christine. Re: IW612 guard interval: What is the default setting? Let me give a supplementary explanation. I'd like to know the default guard interval for 802.11n/802.11ac/802.11ax.
記事全体を表示
flexio camera Hi, We are planning to use a parallel camera with FlexIO on the EVKBRT1170. Referring to the RT1010 sample, we have two questions during the implementation: 1. The PCLK on the RT1010 is said to support up to 20MHz. How much is supported in the case of the RT1170? I couldn't find this information in the datasheet. 2. The sample for the RT1010 is for 8-bit data, but in our case, we need to use 16-bit data. Is it possible to obtain a sample for this? If not, could you guide us on what needs to be modified? Best regards, Re: flexio camera Hi @seobi, 1. The PCLK frequency can be as high as the Clock Source frequency that the FlexIO admits. For the case of the RT1170, this would equate to a maximum of 120MHz. 2. I'm afraid that only 8-bit data is supported for the parallel camera emulated with FlexIO. I apologize for the inconvenience this may cause. BR, Edwin.
記事全体を表示
S32M244LC high-voltage detect threshold Hi      I have a question about high voltage threshold Settings,S32M244LC‘s GDU will be closed when VSUP over 22.6V,Where can I set this value(such as set to 28V),No description of this section is found in the RM &datasheet.      thanks Re: S32M244LC high-voltage detect threshold hi Pavel,    Thank you and regards, Re: S32M244LC high-voltage detect threshold Hi Yan, there is a possibility to set bit HDHVDCFG to 1 , in GDU/CFG register (S32M24x RM rev2, page 1165).  With this bit set, thresholds VHVHDHA and VHVHDHD will be used for overvoltage detector. Thresholds VHVHDHA (min-typ-max: 30.65-32.5-34.6V) and VHVHDHD (min-typ-max: 29.65-31.5-33.6V) are defined in S32M2xx DS rev3, page 38/39 Best regards, Pavel
記事全体を表示
屈光相机 您好,我们计划在 EVKBRT1170 上使用带有 FlexIO 的并行摄像头。 参考RT1010示例,我们在实现过程中有两个问题: 1.据称 RT1010 上的 PCLK 最高支持 20MHz。RT1170 的情况支持多少?我在数据表中找不到这方面的信息。 2. RT1010 的样本是 8 位数据,但在我们的例子中,我们需要使用 16 位数据。是否可以获得此样本?如果没有,您能指导我们需要修改什么吗? 顺祝商祺!
記事全体を表示
IW612 ガードインターバル:デフォルト設定は? IW612 のデフォルトのガード間隔はどれくらいですか?固定値ですか、それとも動的に変数な値ですか?mlanutlを使って詳細を確認しようとしましたが、対応するコマンドが見つかりませんでした。 日時:IW612ガードインターバル:デフォルト設定は何ですか? ご返信よろしくお願いします。 日時:IW612ガードインターバル:デフォルト設定は何ですか? 補足説明をさせてください。 802.11n/802.11ac/802.11ax のデフォルトのガード間隔を知りたいです。
記事全体を表示
フレキシオカメラ こんにちは、EVKBRT1170にFlexIOを搭載したパラレルカメラを使用する予定です。 RT1010 サンプルを参照すると、実装中に 2 つの質問があります。 1.RT1010のPCLKは、最大20MHzをサポートすると言われています。RT1170の場合、どのくらいの対応がありますか?この情報はデータシートに見つかりませんでした。 2. RT1010のサンプルは8ビットデータ用ですが、この場合は16ビットデータを使用する必要があります。これのためのサンプルを入手することは可能ですか?そうでない場合は、何を修正する必要があるのか教えていただけますか? よろしくお願いいたします。
記事全体を表示
IW612 保护间隔:默认设置是什么? IW612 的默认保护间隔是多少?它是固定值还是动态变量值?我尝试使用 mlanutl 检查详细信息,但找不到相应的命令。 回复:IW612 保护间隔:默认设置是什么? 感谢您的回复。 回复:IW612 保护间隔:默认设置是什么? 我再补充说明一下。 我想知道 802.11n/802.11ac/802.11ax 的默认保护间隔。
記事全体を表示