FAQ_MA35D1 SPI-Config Issue

Post Reply
yhcheng3
Posts: 55
Joined: 02 Dec 2022, 10:46

30 Mar 2023, 10:15

Question :

SPI-Config Issue


Answer.

  1. Configure the SPI speed
    If you use the spi-config tool to configure the SPI speed, once you close the device, the SPI device speed will be restored to its maximum frequency.

    We recommend that you set the speed setting as desired in the device tree, as shown below.

    Code: Select all

    spidev@0 {
    …
      spi-max-frequency = <speed_you_want>;
    };
    
  2. Configure the SPI LSB
    If you attempt to configure the SPI LSB using the spi-config tool, it may fail due to problems with the SPI core driver.
    We recommend that you set the LSB setting as desired in the device tree, as shown below.

    It will set SPI controller LSB bit to 1, after driver probe

    Code: Select all

    spi0: spi@40600000 {
        compatible = "nuvoton,ma35d1-spi";
    …
        lsb = <1>;
    };	
    
  3. What is the 'bits per word' and how to modify it.
    The term 'bits per word' refers to the number of bits that can be transmitted or received in a single transaction.

    The default value for the bits per word setting is 8 bits, and we recommend keeping it at this value as it works well in most situations. However, if the application's protocol does not conform to multiples of 8 bits, you can modify the setting in the SPI's device tree using the 'txbitlen' parameter with your desired value


    #MA35D1, #SPI
    .

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests