Posts by dhovden

    I can't find a file with registry settings for ETM070080ADH6, can you send me one or post it here?
    I'm now using defaults and think that that may be the reason for the problems I have

    It seems the ReadMemory, or better said, the nspi.Receive doesn't work properly:


    int ires=nspi.Receive(command, out data, count);


    where command is MEM_READ,0,0 and count is 32


    What I get is this output from the application:


    Code
    1. NSPI version=V3.0
    2. Read memory at 0
    3. ReadMem: return code=32, GetLastErr=87
    4. Read result=
    5. FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF


    I check the return code of Receive and if it's not 0 (and it isn't, Receive seems to return the value of 'count') I call GetLastError.
    The fact the Receive returns the count makes me think it isn't an error but why then do I get an error code from GetLastError?


    87 is ERROR_INVALID_PARAMETER but which one, there are only three. Unless the error happens in Receive itself.
    Again the problem is lack of documentation - I have no up to date documentation telling me how to use a v3.0 NspiPort


    So what goes wrong?


    And, by the way, what should nspi.SpiMode and nspi.ClockFreq be set to?

    True enough but I think that "sample code" should at least work, otherwise it's not a good template.
    And I can test and debug and measure but it's not easy when the documentation tells you the wrong thing.


    And yes, I do appreciate that your platform is flexible and therefore complex, it's just frustating when the days go by waiting for solutions.


    And yes, your support is mostly good :-)

    OK, I thought POLLING was default - I have changed that and now it seems to work so I'm reasonably happy.
    The fact remains though that you ask 500 euro for a software package that


    * comes with no documentation


    * the documentation on your site is incorrect: it says "The easiest way to install the driver is to use the provided
    Windows Cabinet File nspi.cab." and it says to set DriverMethod to 0


    * comes with incorrect sample code that can never work


    That is not impressive! It has also beomce my experience of F&S: when things work they work well but nothing (or little) works straight away.
    Some recent examples: NativeSPI, serial driver, capacitive touch screen


    Two of these have now been solved (it seems) but the touch screen still doesn't work ...

    I have asked our hardware man and we do have external pullups. I have changed the setting of IntPullUp back to 0 but I still get the error message although now it says


    I2C_Readregister: message failed (flags=8)


    i.e. flags=8 instead of flags=4


    I have disabled CAN1 and CAN2 but that didn't change anything.


    Anything else to try??

    "pullups not available" - I have set


    HKLM\Drivers\BuiltIn\PicoCOMA5\I2C1_V120, IntPullUp to 1 (NI2C: IntPullUp = 0x00000001 = 1)


    "configured I2C device is wrong"


    * Device is I2C1 (TCH: I2CDevice =I2C1:)


    "one of the lines used by other driver"


    are we talking the DATA and the CLK lines here or also the IRQ and RST lines? The latter two looks ok


    TCH: Change-IRQ configured on IO-Pin 40
    TCH: Reset-line configured on IO-Pin 35


    For DATA and CLK we use 32 and 33 (SDA and SCL) but from the I/O pin map I see that those pins are also used by CANRX1/TX1. Do I need to disable CAN and if so, how?

    Please ignore the previous post for now (although I still at some point would want to know what all the ASTADPEDT1 stuff is), I managed after several reboots to get into EBoot and did Restore registry after which the PicoCom again worked (and again had the weird ASTADPEDT1 setting and the strange Mode6 and Mode19 entries under Display\LCD)


    The most important thing right, and what I would really like an answer to, is this


    Code
    1. TCH: EnableTouchScreen(): get firmware version failed
    2. Cannot initialize the touch screen controller.
    3. TCH: Driver Failed to Init.
    4. TCH: Could not enable touch panel


    i.e. why isn't the touch screen controller working?

    In an attempt to get further with the touch problem I deleted all the entries in registry key Drivers\Display\LCD (except the defined modes. e.g mode19). The values deleted were



    Because I don't recognise ASTADPEDT1 at all I thought this was unused stuff (the debug log told me that loading ASTADPEDT1 failed anyway), hence the delete.
    I expected the PicoComA5 to start up with the default screen, ET0700 something but it didn't.


    Instead it has gone in to some kind of self-test mode, showing the basic colours and some patterns and it reacts to nothing. I can only enter NBoot mode and that doesn't help any. There seems to be no way to reach the registry, I can't event download a new kernel - how do I get back control of the PicoCom??

    To avoid struggling with PInvoke and loads of IOCTL, we have purchased the SKIT-VS.NET package. Before I describe the problem I have I need to complain a bit first:


    1) The kit is delivered as one zip file with absolutely no documentation for SPI, only the DLL and sample code


    2) All SPI docs on the F&S site refer to 'Native SPI' it isn't easy to know what is what


    3) The most recent document I have found is <!-- m --><a class="postlink" href="http://www.fs-net.de/download/docu/common/english/NetDCU_NSPI_DOTNET_eng.pdf">http://www.fs-net.de/download/docu/comm ... ET_eng.pdf</a><!-- m -->
    It documents "Native SPI V1" and describes NspiPortV1, something which doesn't exist in the current NativeSPI.dll


    4) The most recent SPI document is called "Native SPI support" and is from 2013-03-13 but describes interfacing with SPI through CreateFile, ReadFile etc, i.e. using the standard nspi.dll - but again that word "Native"


    5) The document at NetDCU_NSPI_DOTNET_eng.pdf says "The easiest way to install the driver is to use the provided Windows Cabinet File nspi.cab". Sounds good but there is no such file included with the SKIT-VS.NET package - installation must be done by hand - not impressive considering the package costs euro 500 ...


    Anyway, I have done the install and loaded the sample code, fm25cl64. I upgraded the project to use CF3.5 instead of CF2 and then pressed F5, Start debugging.
    The program is built and deployed and runs and then goes bang at nspi.Receive(command, out data, count):



    The debug output doesn't add much:


    NSPI: Controller 0, SPI_IOControl(): Transmission error (Error 1)


    Now, and I don't know if this is important, I don't actually have a FM25CL64 on my board. Instead I have a Microchip 25LC256 - almost but not quite the same although all addresses (READ, WRITE, WREN etc are the same as in the code sample). But can this be the problem?


    If the hardware isn't the problem, what is?


    Here is what the registry for SPI1 looks like (according to page of the docs)



    Nothing seems to work lately on the PicoComA5: serial comms (e.g RTS), capacitive touch screen and now SPI :-(

    OK, I have added Debug and set it to 255, result:



    This doesn't look good


    Code
    1. TCH: EnableTouchScreen(): get firmware version failed
    2. Cannot initialize the touch screen controller.
    3. TCH: Driver Failed to Init.
    4. TCH: Could not enable touch panel


    What firmware version are we talking about?


    This also may be a problem: LCD: Display-Mode 6, Name ET070080 because that's not really the screen, only almost.
    Do I need an exact mode definition for the ETM070001ADH6 in the registry perhaps? Can I find that on your site?

    Still no touch!!


    Registry looks like this



    Please note: ChangeIO=28 and ResetIO=23 is in hex, WinCE Remote Registry Editor says 40 and 35.
    So the pins used are 32, 33, 35 and 40.


    Any idea why it doesn't works? And why don't we see some activity on pins 32 and 33?

    We are using 35 for Reset and 40 for IRQ now. If I want to specify 40 in the registry, I can enter that as just decimal 40 or hex 0x28, is that correct?


    Reason I ask this is because in the device map for fs_touch_edt.dll (fs_touch_edt.txt), it says 0x56 and 0x57 which is strange because those pins don't even exist And decimal 56 and 57 are LCD pins. Confusing ....


    In your example, you use 41 and 40 but there's no reason why 40 and 35 shouldn't work? (SD/MMC has been disabled)
    Also, pin 41 is PWM, can that be used for other purposes?


    Do I need to set the UseAsIO, DataDir etc registry entries etc for the RST and IRQ pins? Or does fs_touch_edt.dll do that for me?


    The PicoComA5 board is rev 1.22 (2013).


    From the documentation for the touch controller, it looks like, at startup, the RST line should be pulled briefly low so it should be set to initially be high - correct? Then the controller will react with an IRQ - does the PicoCom check for that IRQ before it does anything else on the touch interface?


    Next, CLK must be set high to select I2C and after that everything should work. But our CLK is high (pin 33) so I2C should be selected but we see no activity on the pins 32 and 33 when the screen is touched.