Posts by jmartinez

    Hi,


    Sorry, but I don't have experience with "strace" command. Can I execute this command in my C++ code? If yes, how? I have tried to execute it in the command window (after booting kernel) of the Efus via Serial connection as follow, but I get this error message:


    # strace ./myapp -qws
    -sh: strace: not found


    Thanks.

    Hi,


    Thank for the answer, but I have still the same problem.


    As I developing my own app under Qt, I have modified the example, specifically the "open port" function, that follows. Basically the function not receives the argv of the port, and it is configured in the function (in bold).



    The error in the command windows is the same as reported in Qt:


    Code
    1. # ./EVA_DEMO -qws
    2. CAN Port Can0
    3. error ioctl 19
    4. failed to initialize socket


    Thank you.
    Joaquim

    Hi all,


    I'm developing a CAN app under Qt Creator 3.3.2 with Efus7UL. I'm using the example provided in the buildroot "can.c" and I have an error when ioctl(soc, SIOCGIFINDEX, &ifr), in open_port() function, is executed. The error given by errno is 19.


    Is this error ENODEV 19 /* No such device */?


    What means and how can I solve this error? I am not sure if I am using the correct CAN driver...


    Thanks.


    Joaquim.

    Files

    • can.txt

      (11.28 kB, downloaded 615 times, last: )

    Hi,


    Thanks for the answer.


    I reviewed the Hardware Documentation efus7UL and Hardware Documentation efus Startinterface, and there are not dedicated pins for the ADC. It has only the pin IOOUT_ADC_IN for battery monitoring use.


    According to my local distributor, this demo kit had ADC inputs, as you say, but the setup of the ADC it won't to as easy as it looked like...


    I just have a C example (adc.c and mvf_adc.h), provided by my local distributor, that is was enough to configure and read the ADC. According to this example and your explanation, I have several doubts, please, let me ask you because I think this is very general example (many boards):


    1. According to the mvf_adc.h file there are 15 ADC inputs avalaible. According to your explanation, there are only 10 accessible. So, how are mapped the ADC channels macros to the GPIO1_IO00 to GPIO1_IO09 ADC inputs in the example? Is the ADC0 channel mapped to the GPIO1_IO00 input, ADC1 to GPIO1_IO01, etc.? please, refer to the question 3.
    2. Are the GPIO1_IO00 to GPIO1_IO04 inputs mapped to the ADC 1, and the GPIO1_IO05 to GPIO1_IO09 inputs mapped to the ADC 2?
    3. I need 2 ADC inputs. What inputs must I configure/use in the example so as to connect my hardware through the DemoKit connectors? According to the Hardware Documentation efus7UL, they are only 7 pins in GPIO01_IO0X port and they are: pin 223 (GPIO1_IO00), 221 (GPIO1_IO01), 155 (GPIO1_IO02), 151 (GPIO1_IO03), 219 (GPIO1_IO04), 25 (GPIO1_IO05) and 87 (GPIO1_IO08). No inputs GPIO1_IO06, 07 and 09 are available.
    4. As you mentioned, I can use those inputs that the kit are not using by default. I'm planning to use the GPIO_IO02 and 03 (I2C_A_DAT and I2CA_CLK respec.), because I do not need the I2C bus but, are these inputs used by default.
    5. Finally, have you a specific example for the ADC efus7UL board?


    Thank you very much.


    Joaquim.

    Files

    • adc.txt

      (7.04 kB, downloaded 557 times, last: )
    • mvf_adc.txt

      (5.08 kB, downloaded 621 times, last: )