101 on board SPIFLASH

I am trying to use the on board SPIFLASH chip on the 101. It is connected to SPI0 of the SOC. It at base address of 0x0B0001000. I am using the SPI1 @ 0x0B0001400 for SPI comunication off board and it is working OK. I set it up using
SPI.begin()
SPI.beginTrasaction (SPISettings(4000000, MSBFIRST, SPI_MODE))
after that I write directly to the DR register @ 0x0B0001460 to do all my writes.

I would like to do something similar with the SPI_FLASH SPI0 @ 0x0B0001000 but looking at libary source it looks like SERIALFLASH is using SPI1 with a clock of 50Mb when the maxim speed on the 101 is 16Mb.

Is there a CLASS I can use to set up the SPIFLASH on board the 101? I do not need a file system just a SPI transport on SPI0.

Sure,
the SerialFlash library on 101 core interfaces with the onboard SPI flash (the exported name of its interface is SPI1). We are currently reworking the library but the refactor will be compatible with sketches written for the actual version.

It strange that the Export name is SPI1 when the on board FLASH is on hardware SPI0 of the SOC. We are talking about the same interface? What about the SPI clock being set to 50MHz in the code SPI1. The Maximum the 101 SPI port can do is 16MHz.

The SPI port that would talk to a Shield SPI FLASH is on hardware SPI1 on the SOC but would have the same maximun clock of 16MHz

In trying to change the SENSOR ARC SPI1 clock rate from 2000000 to 16000000. The problem is I am not sure of the ARC SPI register definition. The INTEL QUARK SE C1000 datasheet states that ARC SPI1 registers start at 80010100h and stops at 8001010dh this is only 13 location and not enough to map the SOC SPI resisters. I can not find any .h files for the ss_spi registers. Can anyone point me where I could find an information. The only thong I found was in IMU.cpp

ss_spi_init(SPI_SENSING_1, 2000, SPI_BUSMODE_0, SPI_8_BIT, SPI_SE_1);

I assume the 2000 could be setting the ss_spi clock rate to 2MHz. I tried including this in my startup but SPI_SENSING_1 was not defined in my scope. Do you know what class I need to include?

The singleton name is only a way to uniform development across different boards, so SPI is always mapped to ICSP header, while SPI1 can be anywhere since it's not "standard".

The library is this one https://github.com/01org/corelibs-arduino101/tree/master/libraries/SerialFlash.
It uses SPI1 object, which is defined here

Hope this resources can help you getting started with the SOC SPIs; unfortunately the ARC core datasheet has not been published yet so it's quite cumbersome to hack its internals ATM