恩智浦其他产品知识库

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Other NXP Products Knowledge Base

讨论

排序依据:
Hi    For MCAL, S32R27X-37X_MCAL_4.2_RTM_2.0.1, its default configuration is for S32R372, not for S32R274.    If you want to config with S32R274, you should change the configuration at Resource and disable z7_0 in Mcu.   Before run Launch.bat in cmd window, you'd better execute the follow instructions. del .\cfg\include\*.h del .\cfg\src\*.c copy .\Tresos\workspace\Sample_app_S32R274\output\generated\include\*.h .\cfg\include copy .\Tresos\workspace\Sample_app_S32R274\output\generated\src\*.c     .\cfg\src    After compiled successfully, enjoy the debugging!!! Cheers! Oliver
查看全文
****************************************************************************************************** * The PCF2127T is a CMOS Real Time Clock (RTC) and calendar with an integrated * Temperature Compensated Crystal Oscillator and a 32.768 kHz quartz crystal * optimized for very high accuracy and very low power consumption.   * This simple example code has been written for the FRDM-KL25Z + OM13513 * boards in MCUXpresso IDE v10.1.0 and demonstrates how to set and read * the time/date on the PCF2127T using the SPI (do not forget to remove the * JP1 jumper) interface. It also illustrates how to use a minute interrupt to * generate an interrupt on the INT pin once per minute when the Minutes * register increments. * * In this example the date/time to be set is Wednesday, January 17 2018, 2:45 PM. * * Connection:     FRDM-KL25Z        OM13513 * VDD               J9-4                         P2-2 * GND               J9-18                       P2-1 * MOSI              J2-8                         P2-5 * MISO              J2-10                       P2-6 * SCLK             J2-12                       P2-4 * CS                  J2-6                        P2-3 * INT                 J1-6                        P2-8 ******************************************************************************************************
查看全文
Hi,       NXP changes the documents' structure and user could get the unified information for the same package.     For example, S32R family.     1. You should search data sheet to get the package type and document number, as the snapshot  2.  Search on www.nxp.com for the document, 98ASA00081D 3. Download the file and open it to check. You can get the package's information as your will. Cheers! Oliver
查看全文
In this publication, an example project using the PCF8523 is shown to demonstrate the easy use of the RTC devices from NXP. The PCF8523 is a real-time clock based on an ultra -low power oscillator and using an I2C- bus for interfacing. Some of its features are shown below: Has an ultra -low power consumption Provides time and calendar from seconds to years Accuracy is based on a 32.768 kHz quartz crystal Clock operating voltage: 1.0 V to 5.5 V Low backup current: typical 150 nA at VDD = 3.0 V and Tamb = 25 °C 2- line bidirectional 1 MHz Fast-mode Plus (Fm+) I2C interface, slave address: read D1h, write D0h Battery backup input pin and switch-over circuit Freely programmable timer and alarm with interrupt capability Integrated oscillator load capacitors, programmable for quartz crystals with CL=7pF or CL=12.5 pF Programmable offset register for frequency adjustment Internal Power-On Reset (POR) In this example, the PCF8523 is configured using the I2C interface based on the document UM10760 to generate an interrupt every second. Once the interrupt is generated, the time is read and stored into different variables.   The project was created using the FRDM-KL25Z platform and the OM13511 (I²C-bus RTC PCF8523 demo board). The complete source code is written in KDS IDE. You may find the complete project attached to this post. I highly recommend using the OM13511 as a reference for your projects.
查看全文
In Window Builder the string table is one of the key elements of the resource manager. This application notes gives tips and tricks to ease the use of string tables.
查看全文
This application note describes the changes of the Window Builder code generator that have been released in the latest PEG revision (2.3.13). To fix a bug in the code generator it had become necessary to introduce some changes. The attached document describe the changes in more detail and explain how to deal with them to avoid messing up user code interleaved in the generated code.
查看全文
See an overview of PEG software for developing graphical user interfaces (GUI) for consumer, industrial and automotive display applications.
查看全文
Hi Everyone, I would like to share with you a simple bare metal example for the the SC16IS752 to demonstrate NXP Bridge IC for SPI/ I 2 C host to Dual Uart/IrDa/GPIO interface. This example is based on the OM6273 demo board for the SC16752/762. I made this example working with the NXP FRDM-KL25Z development platform. The example shows the device functionality by creating a simple echo transmission, where you are able to read what you just write into the device. This example illustrates: 1. Initialization of the MKL25Z128 MCU (I 2 C and port modules) 2. I 2 C data write and read operations 3. Initialization of the bridge to perform the communication 4. Transmission and the reception done with interrupt technique 5. Visualization of the echo function using the serial terminal 1. As you can see in the FRDM-KL25Z schematics and the image below, I 2 C signals are routed to the I2C1 module (PTC1 and PTC2 pins) of the KL25Z MCU and the INT1 output is connected to the PTA16 pin. The INT1 output of the SC16IS752 is configured as a push-pull active-low output, so the corresponding PTA16 pin configuration is GPIO with an interrupt on falling edge.                                               Therefore, this is the MCU configuration: void MCU_Init(void) {      //I2C1 module initialization      SIM_SCGC4 |= SIM_SCGC4_I2C1_MASK;          // Turn on clock to I2C1 module      SIM_SCGC5 |= SIM_SCGC5_PORTC_MASK;          // Turn on clock to Port E module      PORTC_PCR1 = PORT_PCR_MUX(2);               // PTC1 pin is I2C1 SCL line      PORTC_PCR2 = PORT_PCR_MUX(2);               // PTC2 pin is I2C1 SDA line      I2C1_F  = 0x14;                               // SDA hold time = 2.125us, SCL start hold time = 4.25us, SCL stop hold time = 5.125us      I2C1_C1 = I2C_C1_IICEN_MASK;              // Enable I2C1 module      //Configure the PTA16 pin (connected to the IRQ of the SC16IS752) for falling edge interrupts      SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK;               // Turn on clock to Port A module      PORTA_PCR16 |= (0|PORT_PCR_ISF_MASK              // Clear the interrupt flag                    | PORT_PCR_MUX(0x1)                    // PTA16 is configured as GPIO                    | PORT_PCR_IRQC(0xA));               // PTA16 is configured for falling edge interrupts      //Enable PORTA interrupt on NVIC      NVIC_EnableIRQ(PORTA_IRQn);                // Enable interrupts      NVIC_ClearPendingIRQ(PORTA_IRQn);          // Clear pending interrupts } ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 2. To perform the read or write operation we'll make use of an I 2 C library which contains to main functions: void I2C_WriteRegister(unsigned char u8SlaveAddress, unsigned char u8RegisterAddress, /*unsigned*/ char u8Data); unsigned char I2C_ReadRegister(unsigned char u8SlaveAddress, unsigned char u8RegisterAddress) Before any data is transmitted or received, the master must send the address of the receiver via the SDA line. The first byte after the START condition carries the address of the slave device and the read/write bit. Table 32. shows how the SC16IS752/SC16IS762’s address can be selected by using A1 and A0 pins. In the demo board OM6273, these  2 pins are connected to JP4 and JP3 and in this example there are two jumpers plugged so A1 = VDD and A2 = VDD, then the SC16IS752’s address is set to 0x90(Write) and 0x91(Read), and the master communicates with it through this address.                                                 The second parameter in the read or write function is the internal register address, these are defined in the SC16IS752.h attached to this document and explained with greater detail in the SC16IS752 datasheet.                                                           3. The SC16IS752 is set to work at 115, 200 baud/s , the Receive Holding Register interrupt is enabled and routed to the INT1 pin that is configured to be a push-pull, active-low output. The registers are shift 3 positions left because the UART's internal register select are the bits 3:0, as shown in table 33. In the example channel 0 is used. This initialization is based in the application notes AN10587 and AN10462, where is possible to find additional information in regards the SC16IS752 // Program channel A for I2C-UART void SC16IS752_Init_ChA (void) {      I2C_WriteRegister(SC16IS752_ADDRESS, LCR_REG     << 3, 0x80);            // 0x80 when LCR[7] = 1 DLL and DLH are accessible      I2C_WriteRegister(SC16IS752_ADDRESS, DLL_REG     << 3, 0x08);         // 0x08 = 115,200 baud rate when XTal = 14.7456 MHz      I2C_WriteRegister(SC16IS752_ADDRESS, DLH_REG     << 3, 0x00);         // 0x00 = 115,200 baud rate when XTal = 14.7456 MHz      I2C_WriteRegister(SC16IS752_ADDRESS, LCR_REG     << 3, 0xBF);            // Access special features register      I2C_WriteRegister(SC16IS752_ADDRESS, EFR_REG     << 3, 0x10);            // enable enhanced functions      I2C_WriteRegister(SC16IS752_ADDRESS, LCR_REG     << 3, 0x03);            // 8 data bit, 1 stop bit, no parity           I2C_WriteRegister(SC16IS752_ADDRESS, IODIR_REG   << 3, 0xFF);            // set GPIO [7:0] to output (input by default)      I2C_WriteRegister(SC16IS752_ADDRESS, IOSTATE_REG << 3, 0x00);            // set GPIO [7:0] to 0x00 (Turn LEDs on)      I2C_WriteRegister(SC16IS752_ADDRESS, IER_REG     << 3, 0x01);            // enable Rx data ready interrupt }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 4. In the interrupt service routine the program reads the interrupt identification register, and it's ready to add a different task for each interrupt, for now it simply enables the data ready flag when the interrupt was generated by the RHR. It also cleans the flag that generated the interrupt. We also have the write function and the read function of the SC16IS752, these two functions access the corresponding THR or RHR registers. void PORTA_IRQHandler() {      //Interrupt service routine      Interrupt_Source iir = I2C_ReadRegister(SC16IS752_ADDRESS, IIR_REG << 3);   //read IIR to retrieve the interrupt source      // IIR[5:1] 5-bit encoded interrupt      switch(iir & 0x3E) {           case RHR: DataReady = 1; break;           default : break;      }      PORTA_PCR16 |= PORT_PCR_ISF_MASK;               // Clear the interrupt flag } void writeSC16IS752(char data) {      I2C_WriteRegister(SC16IS752_ADDRESS, FCR_REG <<3, 0x04);              //clears the contents of the transmit FIFO      while(!(I2C_ReadRegister(SC16IS752_ADDRESS, LSR_REG <<3) & 0x40));    //Is it able to transmit? - Poll Transmit empty indicator      I2C_WriteRegister(SC16IS752_ADDRESS, THR_REG << 3, data);             //Write to the transmit holding register to start transmission } unsigned char readSC16IS752(void) {      return I2C_ReadRegister(SC16IS752_ADDRESS,RHR_REG);                  //Read receive holding register } ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 5. We connect the I 2 C lines with each other in the board, JP6 contains INT1, SDA and SCL in that order, then P1 is connected to EVBUSB2SER (USB to serial device), and this last one to a computer. In the computer must be installed a serial terminal,   for this example Teraterm is used                 We set up Tera Term going to Setup > Serial Port and then select corresponding port to the EVBUSB2SER and baud rate 115,200 This is the main, that should be executed to perform the echo function char DataReady; int main(void) {      unsigned char echo = 0;      MCU_Init();      Pause(500000);      SC16IS752_Init_ChA();      for (;;) {           if(DataReady) {                DataReady = 0;                echo = readSC16IS752();            //Read RHR, since FIFO is disable it only reads the first location                writeSC16IS752(echo);            //Send back the value received           }      }      return 0; }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ After this, every character written in the serial terminal will appear in the serial terminal as you were writing in the command prompt Attached you can find the complete source code written using KDS IDE and some other relevant documentation   If there are any questions regarding this simple application, do not hesitate to ask below. Your feedback or suggestions are also welcome.   Thanks to a major collaborator for this document david_diaz‌. Regards, Darío Arias
查看全文
/************************************************************************************************************* * This simple example code has been written for the FRDM-KL25Z + FRDM-FXS-MULT2-B * boards and illustrates: * * 1. How to read both the altitude (pressure) and temperature data from the MPL3115A2 * using the polling technique. * * 2. How to convert the raw data to real values in meters (Pascals) and degrees Celsius. *************************************************************************************************************/
查看全文
The PEG GUI wiki provides useful “how to” and FAQ information not available on Freescale websites or forums. The links listed below provide useful design resources for product designers and users. PEG GUI discussions under Freescale Other Solutions in the Freescale Community (all spaces) PEG GUI videos PEG GUI FAQ Website
查看全文
View the Webinar Recording
查看全文
With the release of PEG 2.3.13 a newly created widget is available in PEG, called the "Swipe" widget. This application note describes features of the widget and how to make use it with Window Builder and PEG runtime library.
查看全文
The following wikis provide useful “how to” and FAQ information not available on Freescale websites or forums. The links below provide useful design resources for product designers and users. eGUI PEG GUI StarCore DSPs
查看全文
Hi,      Some of PowerPC cores contain time base which could be the ruler to measure the running time of codes.     Generally, e200z4, e200z7 have such registers, RBL and TBU. They are SPR284 and SPR285.      Sample codes could be taken the reference within AN2865SW(Timebase project) .  Enjoy the measuring! Cheers! Oliver BTW, measure the running time of one function on S32K could also be gotten through the link. 
查看全文
See a demonstration of PEG Software to develop graphical user interfaces (GUI) for consumer, industrial and automotive display applications.
查看全文
Four live demonstrations are presented: Timing Attack; Simple Power Analysis; Fault Attack, and finally an RFID Relay Attack demo. Timing Attack demo The Timing Attack demo shows the importance of securely implementing a PIN verification. If a PIN verification is implemented with operations which are not time-invariant - for example an if-else construction - it is possible to identify when an incorrect PIN digit is being compared by observing the timing information of the corresponding EM side-channel measurement. By iterating through all possible values of a PIN digit the correct character will be identified in a maximum of 10 attempts. To make the PIN query secure, a time-invariant comparison has to be implemented. For example, a bitwise XOR comparison and subsequent OR operation for all PIN digits, ensures the same time is taken for all possible comparisons. This scheme is illustrated in the block diagram.             Simple Power Analysis demo The RSA-Algorithm implemented in the Simple Power Analysis demo application is reduced to a simple 8-Bit implementation for illustrative purposes. The physical smart card interface used is contact-based. By monitoring the voltage drop across a shunt resistor it is possible to measure the power consumption of an RSA operation on a digital oscilloscope. Observation of the resulting measurements reveal that it is possible to visually distinguish  single square operations from square and multiply operations. By iteratively logging this sequence of operations, the bits of the exponent, that is the secret key, can be directly identified. By using countermeasures like the square and always multiply algorithm, the decoding of the exponent bits can be prevented and the key protected. The square and always multiply algorithm is illustrated in the block diagram.    Fault Attack demo The Fault Attack demo shows what can happen at software execution, if a flashlight is fired on a decapsulated chip which has no security measures. With simple tools – a mechanical grinding tool and some chemical etchant - it is possible to expose the surface of the chip and crudely inject photons into the sensitive silicon substrate. In this case the flashlight causes a skip in the execution of the PIN verification code if the flash is discharged close to the surface at the correct moment. In normal function expiration the UserPin is either correct or incorrect and access to the data is granted or denied accordingly. With a successful flashlight attack it doesn’t matter which value for UserPin is entered - after several tries the attacker skips the query and has access to the secret data.    RFID Relay Attack demo The RFID Relay Attack demo demonstrates a new paradigm in relay attacks in the context of software emulated smartcards on mobile devices. Previous conditions about proximity of the attacker to the victim and the time when the victim is approached, are negated. With a software emulated smartcard on a mobile device an attacker can intercept and relay the transaction of a potential victim remotely. This new attack paradigm greatly enhances the value of this attack for criminals, and consequently will result in greater malware development efforts. Additional Information on the individual attacks
查看全文
*************************************************************************************************** * The PCF2129AT is a CMOS Real Time Clock (RTC) and calendar with an integrated * Temperature Compensated Crystal Oscillator and a 32.768 kHz quartz crystal * optimized for very high accuracy and very low power consumption. * Detailed Description: * This simple example code has been written for the FRDM-KL25Z + OM13513 * boards and demonstrates how to set and read the time/date on the PCF2129AT * using the SPI (do not forget to remove the JP1 jumper) interface. * * In this example the time to be set is Wednesday, February 8 2017, 2:45 PM. * * Connection:    FRDM-KL25Z       OM13513 * VDD               J9-4                       P2-2 * GND               J9-18                    P2-1 * MOSI              J2-8                      P2-5 * MISO              J2-10                    P2-6 * SCLK              J2-12                    P2-4 * CS                  J2-6                      P2-7 ***************************************************************************************************
查看全文