Sunday, March 26, 2023

Zephyr or FreeRTOS for Cortex M4 on BeaglePlay

TI SOCs on recently launched BeaglePlay has MCU as co-processors, AM62x has 1xM4@400MHz 256KB SRAM. As a standard SDK offering TI provides MCU+ SDK - device drivers with FreeRTOS: [MCU-PLUS-SDK-AM62X Software development kit (SDK) | TI.com]. I was happy to see many applications based on Zephyr with - BeagleBoard.org - beagleconnect

There are significant advantages and disadvantages between both operating systems, example : FreeRTOS gives the flexibility of upgrading to SafeRTOS for safety applications. But Zephyr will limit itself in safety applications. Whereas stacks like lwip and tinyusb need more maturity for  FreeRTOS vs the bluetooth and other networking stack in Zephyr which is more robust.

Can you please help me by participating in this survey to get an idea of what you think would be the best OS for a MCU as co-processor for next gen applications & products?

Link to Survey Portal on LinkedIn

Monday, March 20, 2023

Linux Suspend to RAM on TI's AM62x SOC


Last time I tried hitting suspend to RAM with lowest possible power consumption was on OMAP3 - Beagleboard XM :). I was very happy to see this demo from one of my teammate, the video demonstrates the AM62x EVM going into complete suspend - implies all the device drivers have successfully completed suspend to RAM and the power numbers drop. The device then comes up on resume without any crash as expected :).

The patches and these features are now available with Processors SDK version 8.6 . I hereby request all the SOM manufacturers and development board manufacturers to enable this feature in their software and make it available to end customers.

The upstream effort on power management is also in progress, recently Dhruva has hosted a public repo after rebasing the 5.10 patches on upstream 6.x kernel. hereDevelopers can test individual drivers based on this branch after applying their suspend resume patches and if necessary any DT changes. 

Note: This has lpmdemo enabled by default in sk dt so there isn't any lpm DT for upstream Linux.

The patches can also be reviewed here:
https://lore.kernel.org/linux-arm-kernel/20221128140522.49474-1-g-vlaev@ti.com/

The deep sleep core power consumption that we were able hit was as per spec : 7.7mW, the demo video shows HDMI, CSI Camera and many other drivers going into suspend mode and resuming back.

The steps to validate suspend to RAM is documented in the SDK user manual here, the software supports resume from RTC timer and USB.

The technical white paper on AM62x SOC power consumption is here

Thanks to Vibhore and Dhruva for the content and video.

TI AM6xx Linux device driver's upstream status

Upstreaming Linux device drivers for all the components and peripherals of TI SOCs is always a key focus area for Linux developers at TI. Last year has been bit slower as we didn't move quickly on few key drivers due to complexity of hardware and new changes required to the drivers. The team has now made significant progress in learning the required modifications to get the drivers accepted by the Linux maintainers and have started posting those patches. Majority of the drivers for TI's AM62x are now upstream, the only remaining drivers and the status of the same is captured below:

Thanks to all Linux upstream maintainers for helping us by reviewing and merging the patches.

Module

Features 

Platforms affected

Status

CSI

Base driver
multi stream support
V4L2 enhancements
FPD link base
Serializers / De-serializers
Sensors

AM62x

AM62A

Single Stream CSI-RX: https://lore.kernel.org/all/20230314115516.667-1-vaishnav.a@ti.com/#r

Multi Stream in V4L2: https://lore.kernel.org/all/20221215121634.287100-1-tomi.valkeinen@ideasonboard.com/

FPD-Link Ser/Deser: https://lore.kernel.org/all/20230222132907.594690-1-tomi.valkeinen@ideasonboard.com/

Multi Stream in CSI-RX: https://github.com/jailuthra/linux/commits/csi_multi_wip

Sensors: TBD

DSS

Base support
Dual Display
OLDI / DPI
DSI support

AM62/AM62a
AM62/AM62a
AM62/AM62a
K3 SoCs

Patches in review
https://patchwork.kernel.org/project/dri-devel/list/?series=715487&state=%2A&archive=both

OSPI NAND

Base support

All K3 SoCs

To be posted

OSPI PHY calibration

NOR and NAND calibration for 166Mhz operation

All K3 SoCs

To be posted

Codec

CnM VPU Codecs
JPEG Codecs

AM62A
AM62A

Patches in review
Internal bring up ongoing

GPU - Sitara devices

AM62x

To be posted

Low Power Management

Individual driver RPM support
Deep Sleep 
IO + DDR
Other LPM modes
IO daisy chain wakeup

AM62x

AM62A

To be posted

PRU HW IPs

UART
PWM

AM65/AM64/AM62/AM62a
AM65/AM64/AM62/AM62a

To be posted

PRU RPMSG

AM65/AM64/AM62/AM62a

To be posted

DM R5 IPC /Single R5 IPC

AM62/AM62a

Patches in review

dma-buf heaps 

carevouts and exporters

All k3 SoCs

ICSSG

Dual EMAC
Switch
HSR
TSN

AM65 and AM64

Patches in review
TBD
TBD
TBD

CPSW

IET
mq_prior
Rate limiting
interrupt pacing

All k3 SoCs

Will start in 2Q23


Saturday, March 18, 2023

Launch of TI vision processors for analytics at the edge

 

 

Texas Instruments demonstrates range of micro-controller (MCU) and microprocessors (MPU) at embedded world. These devices cater to various applications in Industrial, Consumer Electronics, Robotics and Vision Analytics based product segments. By design the processors draw very less power, I will cover the steps to measure the power and to evaluate the performance parameters in my upcoming blog post.

Being hands on with one of the recently launched TI's AM62A processor, I can bet this device is something industry would be looking forward to integrating in many of their analytics and edge AI based products. The device comes with hardware accelerators for deep learning and Image processing to integrate RGB raw sensors. This is first device in industry to also support IR sensors like OV2312 - RGB and IR frames are time division multiplexed.

The Yocto build environment based Linux SDK for edge AI provides

  • Upstream RT-Linux LTS Kernel 5.10 (will get migrated to version 6.1 shortly) with peripheral drivers, U-Boot bootloader.
  • Pre-integrated firmware for hardware accelerated deep learning and camera ISP
  • GStreamer plugins and edge AI application stack

The SDK documentation provides simple steps to build, develop and run high performance deep learning applications using a live camera and display. More details on software can be found here