release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > ShanlingM2

Shanling M2


Overview

This is the page for the Shanling M2 port. This device has very similar hardware to the FiioX1.

Port Status

See ShanlingM2Port?.

Main Features

  • Capacities: 256M internal Flash
  • TFT 2.3" 360x400 LCD screen
  • Headphone/Line-out output
  • 24-bit/192KHz DAC + amplifier
  • Hi-speed micro-USB 2.0 port
  • Expandable microSD card slot and microSDHC card slot

Recovery mode

The JZ4760 chip has a usb recovery mode documented in the datasheet. The Shangling M2 can be put in this mode by the following procedure:
  • Turn off the device
  • Push the select button
  • While holding the select button down, plug in the USB cable
  • The screen will stay black and the device will then register itself as a Ingenic device: 601a:470 Ingenic Semiconductor Ltd.

When in recovery mode, the device uses a custom protocol documented in the datasheet. There is a tool in the rockbox repository to send commands to the device.

Boot Procedure

On boot, the cpu will either enter recovery mode or boot from the NAND. When booting from NAND, the CPU will load 8KB of code to the cache and execute them (see bootloader_stage1.bin attached to this page). This first bootloader (IPL) initializes the RAM and loads a secondary bootloader (SPL) at 0x80600000. The SPL is at offset 0x400 (in pages, or 2MiB in bytes). The SPL initializes the LCD and displays an animation while loading the main firmware.

Factory boot

By holding the play button when booting, the device will enter factory mode and check for factory.m2. If this file exists, it will load it to memory, unscramble it (using the same scrambling algorithm as for FiioFirmware sys.bin) and run it at address 0x80001000.

Upgrade procedure

By holding the play button when booting, the device will enter factory mode and check for m2.fw to perform an upgrade. The file must use the FiioFirmware format. The exact way the upgrade procedure works is unclear.

Flash format

The first 2MB are reserved for the IPL, containing many copies of it, as described in the datasheet. The SPL is at 2MiB and of size 1MiB. More investigation are needed to understand the structure of the flash file system and how does it compare to the upgrade file.

Firmware Files

See FiioFirmware for an analysis of the Fiio firmware format.

Components

  • Ingenic JZ4760B?: basically a JZ4760 with a few modifications. See IngenicJz4760B

Pins

Pin Use/Dir Description

PCB Scans

-- AmauryPouly - 23 Oct 2016
I Attachment Action Size Date Who Comment
shangling_m2_ipl_hw_v1.binbin shangling_m2_ipl_hw_v1.bin manage 8.0 K 23 Oct 2016 - 18:53 AmauryPouly  
shanling_m2_spl.binbin shanling_m2_spl.bin manage 1024.0 K 23 Oct 2016 - 18:53 AmauryPouly  
r3 - 25 Oct 2016 - 15:14:52 - AmauryPouly

Copyright by the contributing authors.