![](/media/cache/profiles/10acb44b479957118ed3eaeae25c1560.jpg.50x50_q85.png)
Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester CmdLine MAX541 USBDevice
Diff: MAX11043/MAX11043.h
- Revision:
- 68:ffee1e54d3fe
- Parent:
- 67:5b8a495dda1c
- Child:
- 69:989e392cf635
--- a/MAX11043/MAX11043.h Thu Feb 20 01:16:25 2020 +0000 +++ b/MAX11043/MAX11043.h Thu Feb 20 10:21:21 2020 +0000 @@ -183,17 +183,17 @@ * * // example code declare SPI interface * #if defined(TARGET_MAX32625MBED) - * // TODO1: support SPI hardware-controlled CS instead of GPIO CS (mbed) - * // 2020-02-19 attempting to improve SPI CS timing. - * // Currently CS envelope is 23us (11.4us before SCLK and 8.6us after SCLK). - * // MAX11043 slowest EOC rate is 9us. - * // Trying to use SPI-controlled CS configuration. Not working yet. + * // SPI spi(SPI1_MOSI, SPI1_MISO, SPI1_SCK); // mosi, miso, sclk spi1 TARGET_MAX32625MBED: P1_1 P1_2 P1_0 Arduino 10-pin header D11 D12 D13 D10 + * // DigitalOut spi_cs(SPI1_SS); // TARGET_MAX32625MBED: not connected + * // Support SPI hardware-controlled CS instead of GPIO CS (mbed) + * // 2020-02-19 MAX32625MBED GPIO CS envelope is 23us (11.4us before SCLK and 8.6us after SCLK). + * // 2020-02-19 MAX32625MBED SPI controlled CS envelope 4 channel read reduced to 4.2us (24MHz SCLK), 1.2us setup, 0us hold. + * // 2020-02-19 MAX11043 slowest EOC rate is 9us. * SPI spi(SPI1_MOSI, SPI1_MISO, SPI1_SCK, SPI1_SS); // mosi, miso, sclk spi1 TARGET_MAX32625MBED: P1_1 P1_2 P1_0 Arduino 10-pin header D11 D12 D13 D10 * DigitalOut spi_cs(NC); // TARGET_MAX32625MBED: not connected * // PinName NC means NOT_CONNECTED; DigitalOut::is_connected() returns false - * // compile/link but runtime error Assertion failed: obj->name != (PinName)NC - * // so something is incorrectly trying to drive the CS pin, which is illegal since it's NC - * // TODO: add m_cs_pin.is_connected() guard before writing m_cs_pin = m_SPI_cs_state + * // add m_cs_pin.is_connected() guard before writing m_cs_pin = m_SPI_cs_state + * // to avoid runtime error Assertion failed: obj->name != (PinName)NC * #elif defined(TARGET_MAX32600MBED) * SPI spi(SPI2_MOSI, SPI2_MISO, SPI2_SCK); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13 * DigitalOut spi_cs(SPI2_SS); // Generic: Arduino 10-pin header D10