Skip to content

Flash API enables user-mode reprogramming of memory

With momentum building behind the Renesas RX microcontroller (MCU) family, you can expect a steady flow of new tools that either simplify the development process or enable value-add features in applications. Certainly the Renesas DevCon that takes place in Orange County, California in a couple of weeks is partially responsible for some recent and soon-to-come announcements. But the RX architecture is also proving compelling on its own and Renesas and third-party developers have now had time to build out a robust support system. For example, Renesas application engineers have posted a new application note that describes a “Simple Flash API for RX600.”

The new application note describes an application program interface (API) that allows developers to add Flash reprogramming capabilities into their applications. The API works in user mode so the internal Flash can be reprogrammed during normal MCU operation.

While the title of the application note calls out the RX600, the API can be used with any of the current RX family members including the RX621, RX62N, and RX62T. The RX62N and RX621 both target communications-centric applications while the RX62T targets motor control.

The new application note provides a step by step guide to using the Flash API. For example, programming the Flash relies on a dedicated sequencer called the Flash Control Unit (FCU). The FCU relies on the peripheral clock (PCLK) to set the proper delays in the programming sequence. Moreover the FCU must be aware of the system clock (ICLK) speed to program the Flash correctly. The application note begins with guidance on how to use define statements to set the clock frequencies for the implementation at hand.

The application note also describes how the E1 and E20 debuggers work with both the Flash memory and the High-performance Embedded Workshop (HEW) integrated development environment. The tutorial describes how the HEW can read either the cached data that had been stored in Flash, or the new data based on the reprogramming operation.

Make sure that you check out the application note before working with the Flash on the RX family. There are many other issues that you might not think about at first. For example, the application note covers boot loader issues, the need to disable interrupts during reprogramming operations, and moving an entire application to the boot loader memory area.

Remember the memory map of the RX family is fairly complex as I covered in a recent post. But the integrated Flash and instruction memory is also one key to the performance potential of the RX architecture.

This blog post was originally published on the Renesas Rulz Doctor Micro blog.

Post a Comment

Your email is never published nor shared.