PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 1 PV198 – One-chip Controllers Introduction 2PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 3 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 4 Organizational information ▪ Takes place in room A415 ▪ 13 lessons (2 hours) ▪ Max 2 unexcused absences ▪ Mandatory homeworks for every lesson ▪ deadline- until next lesson ▪ 1/0.5/0 points per homework ▪ 2 points lost mean failure ▪ Exam at the end of course ▪ Implement homework-ask program ▪ Extra oral question PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 5 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools Course overview ▪ Expected knowledge of C language ▪ Create embedded applications ▪ Get to know common peripherals and how to use them 6PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 7 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools Lectures ▪ Basic peripherals 1. GPIO 2. Interrupts/Timers 3. PWM 4. ADC ▪ Communication interfaces 5. SPI 6. I2C 7. UART ▪ Advanced peripherals(use of libraries) 8. LCD 9. Memory Card + Sound 10. USB 11. Ethernet 8PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 9 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools Hardware introduction NXP FRDM-K66F board • MK66FN2M0VMD18 MCU • 180 MHz • 2 MB Flash memory • 256 kB SRAM • Accelerometer, Magnetometer • 3-colored LED • 2 push buutons • USB • Ethernet • Audio • … and more 10PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček Hardware introduction 11PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček Hardware introduction ▪ Product page: main source of information – description, guide, links ▪ Additional information: detailed information ▪ Get started: step-by-step guide with pictures and videos ▪ Documentation: ▪ Board user guide: information about the board and its peripherals ▪ K66 reference manual: MCU information – features, registers description ▪ K66 data sheet – technical data: MCU characteristics ▪ Board schematics 12PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 13 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools Hello World Get started: step-by-step guide with pictures and videos ▪ Step #3 – Use MCUXpresso IDE 14PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček Hello World ▪ Explore project content 15PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček Hello World Board folder ▪ Files generated by MCUXpresso Confic Tools ▪ clock_config, pin_mux and peripherals ▪ Board definitions ▪ E.g. defines for LEDs, buttons, debug, etc. 16PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček Hello World Drivers folder • SDK files • Provides API to control peripherals 17PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček Hello World Source folder ▪ Contains your application code ▪ Contains main function 18PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 19 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools MCUXpresso 20PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 21 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools MCUXpresso IDE ▪ Eclipse-based development environment for NXP®MCUs ▪ Free ▪ Code size unlimited ▪ Integrated configuration tools, including pins,clock and peripherals tools ▪ Multicore debugging ▪ Visualisation of- registers,variables,heap,stack,… ; values ▪ Can be extended with Eclipse plug-ins 22PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček MCUXpresso IDE ▪ Console / Terminal ▪ Quickstart Panel ▪ Project explorer – always select your project ▪ Debugging – pause, breakpoints, variables, step over, step into, which icons to use ▪ Config Tools – how to open, save, update 23PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 24 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools MCUXpresso SDK ▪ Framework equivalent ▪ Production-grade software with integrated RTOS(optional), integrated stacks and middleware, reference software, and more ▪ Open-source peripheral drivers that provide stateless, high performance, easy-to-use APIs ▪ MISRA-C:2004 compliant and checked with Coverity static analysis tools ▪ Stacks/middleware: USB, FatFs, IwIP, SDMMC, TensorFlow, … 25PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček 26 Content 1. Organizational information 2. Course overview 3. Lectures 4. Hardware introduction 5. Hello World 6. Software introduction – MCUXpresso 1. Integrated Development Environment (IDE) 2. Software Development Kit(SDK) 3. Config Tools MCUXpresso Config Tools ▪ Generate initialization C code ▪ Pins tool – assigns internal signals to external pins, sets, electrical properties ▪ Clocks tool – graphical representation of the MCU clock tree system ▪ Peripherals tool – configures peripherals ▪ Trusted Execution Environment(TEE) – Configures protection and isolation of sensitive parts of the application 27PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček MCUXpresso Config Tools - tips ▪ Check selected project in the combo box ▪ Don’t forget to “Update Code” 28PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček Homework ▪ Import SDK project for FRDM-K66F called “bubble” ▪ Run the application on the board ▪ Clone your GIT repository. ▪ Create new branch called: “Week_01” ▪ Create new commit with single file and commit it ▪ Create “git tag” and push it to repository with commit 29PV198 – One-chip Controllers, Introduction / Daniel Dlhopolček