Jump to content

martinayotte

Members
  • Posts

    3892
  • Joined

  • Last visited

Posts posted by martinayotte

  1. The way you are reading the serial port is ugly since you try to read(1000) without even checking if there is something to read, and yes 0.1ms is waste of time, especially if serial is empty, you should make it longer.

    You should is serial.inWaiting() > 0 to check if at least one char has come in...

     

  2. Their isn't much diffs bewtween H2+ and H3.

    But as I stated above "If your wish is to have a LED reflecting the fact that the chip is been resetted but no single byte read from SDCard, your only solution is to connect that LED to reset, but that doesn't mean much since a reboot won't make that LED turned on." , I don't think your wishes can be achieve ...

     

     

  3. Why don't you choose another GPIO for IRQ ? You don't have any left ?

    According to Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt, the driver requires it :

     

     


    * Microchip MCP251X stand-alone CAN controller device tree bindings

    Required properties:
     - compatible: Should be one of the following:
       - "microchip,mcp2510" for MCP2510.
       - "microchip,mcp2515" for MCP2515.
     - reg: SPI chip select.
     - clocks: The clock feeding the CAN controller.
     - interrupt-parent: The parent interrupt controller.
     - interrupts: Should contain IRQ line for the CAN controller.

    Optional properties:
     - vdd-supply: Regulator that powers the CAN controller.
     - xceiver-supply: Regulator that powers the CAN transceiver.

    Example:
            can0: can@1 {
                    compatible = "microchip,mcp2515";
                    reg = <1>;
                    clocks = <&clk24m>;
                    interrupt-parent = <&gpio4>;
                    interrupts = <13 0x2>;
                    vdd-supply = <&reg5v0>;
                    xceiver-supply = <&reg5v0>;
            };
     

     

     

    EDIT : @zador.blood.stained bet me, time to do copy/paste last to long ... ;-)

  4. 46 minutes ago, Pop Andrei Lucian said:

    Under official website: http://linux-sunxi.org/images/4/4b/Allwinner_H3_Datasheet_V1.2.pdf

    At page 68 it is stated that GPIOs PC3 and PC4 are "Default pulled up" (at reset time).

    Ok ! I see, it is not the OPiLite schematic, but the SoC H3 Datasheet.

     

    Looking atthis page 68, you can see that all GPIOs are at "Z" Reset State (during Reset been asserted), this means high-impedance like I mentioned.

    Also, further on page 74, even those 4 GPIOs with PullUps (which probably mean internal pullups on the pins itself, I didn't verify with a scope), have their "Default IO State" all to "DIS", means "disabled", and they stay like that until been initialized.

    That is why you still seeing them with value of zero...

     

    If your wish is to have a LED reflecting the fact that the chip is been resetted but no single byte read from SDCard, your only solution is to connect that LED to reset, but that doesn't mean much since a reboot won't make that LED turned on.

     

    EDIT : BTW, the reason those 4 pins have internal pullups is now clear, it is because there function2 is to attached a NAND, NAND_CE1/NAND_CE0/NAND_RB1/NAND_RB0, and having those floating to unknown state would means that NAND could be corrupted, so that is why they added those special pullups directly on the pin to prevent that. This means also the "Z" on page 68 for those pins is biased.

     

    EDIT2 : I've verified with my scope, and PullUps are effectively permanently there, while other GPIOs needs to be configured to get them.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines