Posts by dhovden

    The debug output wasn't really readable (what happended to Preview?) in my previous post so here it is again


    Microsoft Windows CE Bootloader Common Library Version 1.2 Built Apr 3 2014 10:23:30
    Microsoft Windows CE Bootloader for PicoCOMA5 Built Apr 3 2014
    Portions copyright (c) 2012 F&S Elektronik Systeme GmbH
    Boot Loader, Version 0.7
    NBoot, Version VN08
    HW rev. 1.20


    HW-Watchdog: ON
    System ready!
    Preparing for download...
    Press >S< to step into monitor...
    AUTO BOOT enabled
    Kernel (32946kB) read from flash disk started finished in 5120 milliseconds
    INFO: OEMLaunch: Jumping to Physical Address 0x8010AE8Ch (Virtual Address 0x0h)...


    Jumping to Kernel @ 0x8010AE8C
    Windows CE Kernel for ARM (Thumb Enabled) Built on Mar 8 2013 at 17:05:33
    INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xb
    OAL Log enable : 1
    OAL Log mask : 3
    OAL_IntrInit: TODO
    +OALTimerInit(1 131 0)


    PicoCOMA5 V1.06 - Firmware Init
    Copyright (c) 2013 F&S Elektronik Systeme GmbH
    Build: Apr 14 2014/14:15:55
    FMD: Version 1.0
    FMD: g_pNFConReg=0xb00e0000 --> FMD: NAND ID:0x2cf18095 --> MICRON: 1GBit (128MB)
    FMD: Block 0 to 15 are locked for boot loader
    OAL: Enable SCU
    INFO: No external RTC found!.
    cBoardConfig.chFeatures1=0x10 16 chBoardType=0x1
    [OAL] RestartReason: Software
    FMD: Version 1.0
    FMD: g_pNFConReg=0xd0330000 --> FMD: NAND ID:0x2cf18095 --> MICRON: 1GBit (128MB)
    FMD: Block 0 to 15 are locked for boot loader
    FSPART: FS partition driver loaded
    PM-NETDCU: STARTED
    BE2: Version 1.4, ActiveKey = Drivers\Active\01
    PSS: Version 1.1, ActiveKey = Drivers\Active\07
    NI2C: Version 0.7, ActiveKey = Drivers\Active\12
    TCH: Version 0.5, ActiveKey = Drivers\Active\13
    TCH: Touch Driver attached, Version 0.5
    BE2: Version 1.4, ActiveKey = Drivers\Active\14
    NI2C: Version 0.7, ActiveKey = Drivers\Active\15
    NI2C: Priority256 = 0x00000067 = 103 (Default)
    NI2C: ClockFreq = 0x00030d40 = 200000
    NI2C: DeviceArrayIndex = 0x00000001 = 1
    NI2C: IntPullUp = 0x00000000 = 0
    NI2C: DrvStrength = 0xffffffff = 4294967295 (Default)
    NI2C: RepeatedStarts = 0x00000001 = 1
    NI2C: -GetRegistryData()
    NI2C1: I2C_Init: MUX Pad Control Register[38]=0x00000001
    NI2C1: I2C_Init: MUX Pad Control Register[39]=0x00000001
    UART: Version 1.9, Key = Drivers\Active\18
    UART: Version 1.9, Key = Drivers\Active\19
    UART: Port disabled. Serial debug is on !
    ENET: Version 01.01, ActiveKey = Comm\ETHNETA
    AIN: Version 1.2, ActiveKey = Drivers\Active\21
    PWM: Version 1.2, ActiveKey = Drivers\Active\22
    EXTRTC: Version 1.1, ActiveKey = Drivers\Active\23
    NI2C3: +I2C_Open()
    NI2C3: [2214] 0xd0b42a00: Device opened
    NI2C3: -I2C_Open()
    EXTRTC: No external RTC detected
    NI2C: +I2C_Close(0xd0b42a00)
    NI2C: -I2C_Close()
    I2C: Version 4.2, ActiveKey = Drivers\Active\24
    WAV: Version 2.3, ActiveKey = Drivers\Active\31
    UsbHost : New Function [address(1) / layer(0)]
    Attach moutouchHID
    BCS: Version 1.4, ActiveKey = Drivers\Active\39
    NSPI: Version 3.0, ActiveKey = Drivers\Active\44
    NSPI: Switching to divider 448 (CTAR = 0x000f0046) -> ClockFreq = 186090
    NSPI: Switching to SPI mode 0: Clock active high, latch on 1st = rising edge
    NSPI: Switching to driver method 1: Polling mode
    NSPI: Version 3.0, ActiveKey = Drivers\Active\45
    DIO: Version 2.8, ActiveKey = Drivers\Active\46
    LCD: Version 1.5, ActiveKey = Drivers\Display\LCD
    LCD: Read registry settings from Drivers\Display\LCD
    NI2C3: +I2C_Open()
    NI2C3: [2728] 0xd0e3c640: Device opened
    NI2C3: -I2C_Open()
    LCD: ASTADPEDT1.dll - Init failed
    LCD: Could not intialize external PWM device AstADPEP1 (LE:2)
    LCD: Display-Mode 101, Name EDT ETM70080
    TCH: Debug =0xff
    TCH: I2CDevAddr =0x70
    TCH: ChangeIO =0x14
    TCH: ResetIO =0xf
    TCH: WakeIO =0x0
    TCH: ChangeIOFunction =0x0
    TCH: LogFile =
    TCH: I2CDevice =I2C1:
    TCH: LogFileDebug =0x0
    TCH: LogFileTruncate =0x1
    ENET: Version 01.01, ActiveKey = Comm\ETHNETB
    TchProxy: touch driver cann't be loaded. Check touch driver registry settings.
    TCH: InvertX =0x0
    TCH: InvertY =0x0
    TCH: SWCalibration =0x0
    NI2C1: +I2C_Open()
    NI2C1: [3038] 0xd1d26120: Device opened
    NI2C1: -I2C_Open()
    TCH: Change-IRQ configured on IO-Pin 20
    TCH: Reset-line configured on IO-Pin 15
    NDCUCFG V 56 started. Platform: PicoCOMA
    NDCUCFG Open COM1: at 38400 Baud
    CreateFile() failed -> ERROR COM1:
    CheckAutoStart: Version 1.7, LaunchNum = 100
    TCH: Touch controller detected (P0700M06*A1G_120307$)

    Still having some problems talking to a MCP23S08 on SPI2 using nativespi.dll


    I have defined SPI1 and SPI2 like this


    00 "Debug"=dword:1 \
    01 "Prefix"=string:SPI \
    02 "Dll"=string:FS_NSPI.dll \
    03 "Order"=dword:101 \
    04 "Index"=dword:1 \
    05 "CsPin"=dword:41 \
    06 "FriendlyName"=string:Native SPI driver \
    07 "DeviceArrayIndex"=dword:0 \
    08 "DriverMethod"=dword:1 \


    00 "Debug"=dword:1 \
    01 "Prefix"=string:SPI \
    02 "Dll"=string:FS_NSPI.dll \
    03 "Order"=dword:102 \
    04 "Index"=dword:2 \
    05 "CsPin"=dword:15 \
    06 "FriendlyName"=string:Native SPI driver \
    07 "DeviceArrayIndex"=dword:1 \
    08 "DriverMethod"=dword:1 \


    Not really sure what Order and DeviceArrayIndex should be
    CSPin set to 15 as specified in earlier F&S post


    Microsoft Windows CE Bootloader Common Library Version 1.2 Built Apr 3 2014 10:23:30Microsoft Windows CE Bootloader for PicoCOMA5 Built Apr 3 2014Portions copyright (c) 2012 F&S Elektronik Systeme GmbHBoot Loader, Version 0.7NBoot, Version VN08HW rev. 1.20

    HW-Watchdog: ONSystem ready!Preparing for download...Press >S< to step into monitor...AUTO BOOT enabled Kernel (32946kB) read from flash disk started finished in 5120 millisecondsINFO: OEMLaunch: Jumping to Physical Address 0x8010AE8Ch (Virtual Address 0x0h)...

    Jumping to Kernel @ 0x8010AE8CWindows CE Kernel for ARM (Thumb Enabled) Built on Mar 8 2013 at 17:05:33INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xbOAL Log enable : 1 OAL Log mask : 3 OAL_IntrInit: TODO+OALTimerInit(1 131 0)

    PicoCOMA5 V1.06 - Firmware InitCopyright (c) 2013 F&S Elektronik Systeme GmbHBuild: Apr 14 2014/14:15:55FMD: Version 1.0FMD: g_pNFConReg=0xb00e0000 --> FMD: NAND ID:0x2cf18095 --> MICRON: 1GBit (128MB)FMD: Block 0 to 15 are locked for boot loaderOAL: Enable SCU INFO: No external RTC found!.cBoardConfig.chFeatures1=0x10 16 chBoardType=0x1[OAL] RestartReason: SoftwareFMD: Version 1.0FMD: g_pNFConReg=0xd0330000 --> FMD: NAND ID:0x2cf18095 --> MICRON: 1GBit (128MB)FMD: Block 0 to 15 are locked for boot loaderFSPART: FS partition driver loadedPM-NETDCU: STARTEDBE2: Version 1.4, ActiveKey = Drivers\Active\01PSS: Version 1.1, ActiveKey = Drivers\Active\07NI2C: Version 0.7, ActiveKey = Drivers\Active\12TCH: Version 0.5, ActiveKey = Drivers\Active\13TCH: Touch Driver attached, Version 0.5BE2: Version 1.4, ActiveKey = Drivers\Active\14NI2C: Version 0.7, ActiveKey = Drivers\Active\15NI2C: Priority256 = 0x00000067 = 103 (Default)NI2C: ClockFreq = 0x00030d40 = 200000NI2C: DeviceArrayIndex = 0x00000001 = 1NI2C: IntPullUp = 0x00000000 = 0NI2C: DrvStrength = 0xffffffff = 4294967295 (Default)NI2C: RepeatedStarts = 0x00000001 = 1NI2C: -GetRegistryData()NI2C1: I2C_Init: MUX Pad Control Register[38]=0x00000001NI2C1: I2C_Init: MUX Pad Control Register[39]=0x00000001UART: Version 1.9, Key = Drivers\Active\18UART: Version 1.9, Key = Drivers\Active\19UART: Port disabled. Serial debug is on !ENET: Version 01.01, ActiveKey = Comm\ETHNETAAIN: Version 1.2, ActiveKey = Drivers\Active\21PWM: Version 1.2, ActiveKey = Drivers\Active\22EXTRTC: Version 1.1, ActiveKey = Drivers\Active\23NI2C3: +I2C_Open()NI2C3: [2214] 0xd0b42a00: Device openedNI2C3: -I2C_Open()EXTRTC: No external RTC detectedNI2C: +I2C_Close(0xd0b42a00)NI2C: -I2C_Close()I2C: Version 4.2, ActiveKey = Drivers\Active\24WAV: Version 2.3, ActiveKey = Drivers\Active\31 UsbHost : New Function [address(1) / layer(0)]Attach moutouchHIDBCS: Version 1.4, ActiveKey = Drivers\Active\39NSPI: Version 3.0, ActiveKey = Drivers\Active\44NSPI: Switching to divider 448 (CTAR = 0x000f0046) -> ClockFreq = 186090NSPI: Switching to SPI mode 0: Clock active high, latch on 1st = rising edgeNSPI: Switching to driver method 1: Polling modeNSPI: Version 3.0, ActiveKey = Drivers\Active\45DIO: Version 2.8, ActiveKey = Drivers\Active\46LCD: Version 1.5, ActiveKey = Drivers\Display\LCDLCD: Read registry settings from Drivers\Display\LCDNI2C3: +I2C_Open()NI2C3: [2728] 0xd0e3c640: Device openedNI2C3: -I2C_Open()LCD: ASTADPEDT1.dll - Init failedLCD: Could not intialize external PWM device AstADPEP1 (LE:2)LCD: Display-Mode 101, Name EDT ETM70080TCH: Debug =0xffTCH: I2CDevAddr =0x70TCH: ChangeIO =0x14TCH: ResetIO =0xfTCH: WakeIO =0x0TCH: ChangeIOFunction =0x0TCH: LogFile =TCH: I2CDevice =I2C1:TCH: LogFileDebug =0x0TCH: LogFileTruncate =0x1ENET: Version 01.01, ActiveKey = Comm\ETHNETBTchProxy: touch driver cann't be loaded. Check touch driver registry settings.TCH: InvertX =0x0TCH: InvertY =0x0TCH: SWCalibration =0x0NI2C1: +I2C_Open()NI2C1: [3038] 0xd1d26120: Device openedNI2C1: -I2C_Open()TCH: Change-IRQ configured on IO-Pin 20TCH: Reset-line configured on IO-Pin 15NDCUCFG V 56 started. Platform: PicoCOMANDCUCFG Open COM1: at 38400 BaudCreateFile() failed -> ERROR COM1:CheckAutoStart: Version 1.7, LaunchNum = 100TCH: Touch controller detected (P0700M06*A1G_120307$)


    Here's my VB code opening SPI2


    nspi2 = New NspiPort("SPI2:")
    nspi2.Method = NspiPort.DriverMethod.POLLING
    nspi2.SpiMode = cbMode.SelectedIndex ' The MCP23S08 chip uses SPI Mode 0 (SCLK base polarity is logic low, data is transferred on rising edge of SCLK).
    nspi2.ClockFreq = 500000 'SPI can work at any clock rate up to 10 MHZ.
    say("NSPI version=" + nspi2.Version + ", SPI mode=" + nspi2.SpiMode.ToString())


    The output from the above is "NSPI version=3.0, SPI mode=0"


    But when writing to and reading from the MCP23S08, I don't get any meaningful data, the data isn't even always the same.
    The writing and reading work in the sense that I don't get any errors but the data transmitted/received is wrong.


    Any ideas?

    Strange, SPI mode 3 didn't work at all but mode=1 produces the correct results. The documentation from Microchip says 0,0 or 1,1 which I take to mean 00=0 or 11=3. Anyway, it works which is the main thing :-)

    I'm using mode 0 - I think the EEPROM device supports using both mode 0 and 3.


    What I saw on the oscilloscope was that CLK and DATA signal were in phase with each other which I found strange, normally there's a delay between CLK and DATA. Having them in phase may mean that the timing is a bit off now and again and the wrong bit value is read.


    For the 25LC256 EEPROM, we use pin 29=PCS0 (PicoCom pin, decimal) and for the MCP23S08 DIL switch we use CS pin 39 (Picocom pin, decimal)


    If this can be solved quickly from your side that would be really helpful! If not, if it will take time to fix, please let us know because in that case we need to consider alternatives.

    With the new kernel, the SPI communication through NativeSPI.DLL all of a sudden works although there's still one problem


    I write: 78-78-78-78-78-78-00
    I read: F8-78-78-78-78-78-00


    I write: 48-65-6C-6C-6F-20-77-6F-72-6C-64-21-00
    I read: C8-65-EC-6C-6F-A0-77-EF-F2-6C-64-21-80


    At times, bit 7 has been set, in a fairly random way - any ideas what could be causing that? Your DLL?


    When do you think you will have a version ready that will support CSpin and several SPI devices?


    In the registry, entry Drivers\BuiltIn\SPI\CSPin has a value of 41 (decimal) and that must be the default since I have just downloaded a new image.
    Does that mean that the DLL completely ignores the CSPin setting and uses 29 anyway?

    After download of kernel image I get this but then nothing happens and screen remains black - maybe backlight is at 0, will check that


    Managed to get somehwat further ('f' after download was needed), when Eboot starts up I get this:


    Boot Loader, Version 0.7
    NBoot, Version VN08
    HW rev. 1.20


    Although on the board itself it says 1.22


    But when I boot into EBoot I get prompted for a MAC address (Enter WindowsCE MAC address (actual ff:ff:ff:ff:ff:ff):) but where can I find that?


    And if I ignore the prompt and download the kernel (using 'de' and the 140414 kernel again) it gets a bit further but hangs on CheckAutoStart.
    So still no Windows ....

    I have tried downloading the latest kernel, the 140414 version, but after download I get "Jumping to Kernel @ 0x8010AD4C" and then nothing more happens.
    So that doesn't work. Fortunately, after downloading the 131204 version everything worked again.


    I have also downloaded NBoot_08 (using 'D' in the loader) but when it starts it still shows as 05. Do I need to do something after the download, like flashing?


    Can't tell if the update to EBoot_07 worked because it shows no version number at boot time (I used 'd' in NBoot).


    So, anyway, kernel update didn't work and SPI still doesn't work.

    I will upgrade to latest kernel.


    Please update SPI driver to support several CS pins. We have two SPI devices (EEPROM and DIL switch) on our board.


    It's a bit strange having documentation claiming something that isn't even working yet isn't it?

    That's great but why didn't you tell me this before? Instead of saying things like


    Quote

    i2cdevaddr = "address of you touch controller"


    and


    Quote

    The "Device Address" or "Slave Address" must be found in the data sheet (FTxxxx)of your controler (maybe you can adjust different addresses by HW jumpers ... ).


    That would have saved quite a lot of time ...


    And how could anyone possibly know, because the documentation sure doesn't mention it, that the 0x38 is to be specified shifted one bit to the left? Why not just say "Specify address as 0x70" and be done with it?

    I'm using the december 2013 kernel, do you know if that should work as well?


    I did a registry reset not long ago and has changed very little since, I don't think that will help. The only thing that can get in the way is CAN (correct?) and I have disabled that. But I will double-check that 29 isn't used somewhere else.


    You write "Only pin 29 is usabel as CS" but that is strange because this is what the documentation says



    So what is right and what is wrong?

    1) But I can use CSpin to specify CS can't I? If I don't want to use 29 or if I have more than one SPI device, in which I must have different CS pins


    3) Do you mean the driver always uses 29 and ignores the value of CSPin? And 29 is the pin number on the PCA5 itself?

    Using a PicoComA5 board, a 25LC256 Microchip EEPROM and your NativeSPI library V3, including the sample app, we have checked what happens on the SPI lines during communication with an oscilloscope.


    We are using SPI1 and have set CSPin to 11 (decimal). It isn't clear whether the line should be specified as IO-pin (11) or PCA5 pin (29) so we have tried both. The other lines (MISO, MOSI and CLK) were connected to the standard pins 26-28.


    All pins except CLK had external pullups.


    What we see is that CS never goes low, neither during read nor during write. So either something is wrong in your library or the library is not using the pin specified in CSpin. All other lines (i.e. SI, SO and CLK) showed up nicely on the oscilloscope.


    To check our connection to the CS pin of the EEPROM we disabled SPI and configured pin 29 (port 1, pin 3) as GPIO and wrote code to toggle it: worked perfectly.


    Questions:


    1) How is CSpin to be specified, as IO-pin or PCA5 pin?


    2) Why don't we see CS going low during read and write actions?


    3) Does NativeSPI use some other pin for CS?

    We have managed to get the touch controller to work. For information on how the FT5406 works we were using "EP0xxM06
    Application Note" which describes the workings of the touch panel we're using, the EP0700M06.


    Unfortunately there are two errors in this documentation:


    1) Section describes pin 7, WAKE as "Active LOW WAKE Signal input" whereas WAKE in reality is supposed to go high at power on. This is stated later in the documentation but caused some confusion.


    2) Section 3 states "I2C Interface is configured in SLAVE mode. Slave address is 0x38" but the address that must be used is in fact 2*0x38=0x70


    Once we had corrected this the touch panel worked..

    OK, no reaction to any of my latest posts so I'll try again:


    * What pin numbers do the NativeSPI DLL v3 expect? 26-29?


    * Can I tell the NspiPort class to use other pins and, if so, how? And if not possible, how can I use the DLL for more than one SPI device?

    Our HW:
    - PCA5 Rev. 122 and SKIT Rev. 100
    - Display ETM070001ADH6 with FT5406EE8 touch controller


    I have tried both 0x70 and 0x38 as I2CDevAddr but still doesn't work.


    The only differences I can see now are these:


    * Our display is type ETM070001ADH6 - do you have a registry file with proper settings for this display somwhere? Can't find it on the site


    * The ResetIO and WakeIO lines


    Your debug output

    Code
    1. LCD: Display-Mode 6, Name ET070080
    2. TCH: Change-IRQ configured on IO-Pin 20
    3. TCH: Reset-line configured on IO-Pin 21
    4. TCH: Touch controller detected (P0700M06*A1G_120307$)


    My debug output

    Code
    1. LCD: Display-Mode 101, Name EDT ETM70080
    2. TCH: Change-IRQ configured on IO-Pin 20
    3. TCH: Reset-line configured on IO-Pin 15


    IO-PIN 15 is also used by SD/MMC but SDMMC_CH2 in the registry has been disabled, flags=4 - is that enough to free this pin?


    We use lines 32 and 33 for DATA and CLK, have IntPullups set to 0 (because have external pullups)
    All other touch controllers have been disabled, flags=4


    Finally, what are the I2C0_SDA and CLK lines on PCA5 pins 30 and 31 (IO pins 49 and 50)?

    In your debug output I miss the following lines which I get - could you please post them as well


    TCH: Debug =0xff
    TCH: I2CDevAddr =0x70
    TCH: ChangeIO =0x28
    TCH: ResetIO =0x23
    TCH: WakeIO =0x0
    TCH: ChangeIOFunction =0x0
    TCH: LogFile =
    TCH: I2CDevice =I2C1:
    TCH: LogFileDebug =0x0
    TCH: LogFileTruncate =0x1
    TCH: InvertX =0x0
    TCH: InvertY =0x0
    TCH: SWCalibration =0x0
    NI2C1: +I2C_Open()
    NI2C1: [6684] 0xd2fba4e0: Device opened
    NI2C1: -I2C_Open()
    TCH: Change-IRQ configured on IO-Pin 40
    TCH: Reset-line configured on IO-Pin 35
    TCH: Interrupt registered successfully (IRQ=265, SYSINTR=26)


    And, again: how do I know what the value of I2CDevAddr should be?