Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Ray

Pages: [1]
1
Hi Mark,
I'm sure this is me not understanding HTML, about all I know I've learned doing this project, and html5-editor.net for building tables.
From 3admin.htm  I'm using your SNTP TimeZone drop down box and enable checkbox, and IP address box, but that works They properly save the parameters, however, they don't ever refresh the browser controls so after a save, they don't properly show the selections.  The IP address populates correctly:

HTML:

<form action=sntpcfg.htm name=r>
<table border="0"><tr><th>
<table border="1">
<p style=""font-size: 1.5em;""><strong>SNTP Server configuration</strong></p>
<tr><th>
Time Zone<select name=C>
<option value="a"$sCa0>UTC-12:00
<option value="b"$sCb0>UTC-11:00
<option value="c"$sCc0>UTC-10:00 HAST
<option value="d"$sCd0>UTC-9:00 AKST
<option value="e"$sCe0>UTC-8:00 PST
<option value="f"$sCf0>UTC-7:00 MST
<option value="g"$sCg0>UTC-6:00 CST
<option value="h"$sCh0>UTC-5:00 EST
<option value="i"$sCi0>UTC-4:30
<option value="j"$sCj0>UTC-4:00 AST
<option value="k"$sCk0>UTC-3:30 NST
<option value="l"$sCl0>UTC-3:00
<option value="m"$sCm0>UTC-2:00
<option value="n"$sCn0>UTC-1:00
<option value="o"$sCo0>UTC
<option value="p"$sCp0>UTC+1:00
<option value="q"$sCq0>UTC+2:00
<option value="r"$sCr0>UTC+3:00
<option value="s"$sCs0>UTC+3:30
<option value="t"$sCt0>UTC+4:00
<option value="u"$sCu0>UTC+4:30
<option value="v"$sCv0>UTC+5:00
<option value="w"$sCw0>UTC+5:30
<option value="x"$sCx0>UTC+5:45
<option value="y"$sCy0>UTC+6:00
<option value="z"$sCz0>UTC+6:30
<option value="A"$sCA0>UTC+7:00
<option value="B"$sCB0>UTC+8:00
<option value="C"$sCC0>UTC+9:00
<option value="D"$sCD0>UTC+9:30
<option value="E"$sCE0>UTC+10:00
<option value="F"$sCF0>UTC+11:00
<option value="G"$sCG0>UTC+12:00
<option value="H"$sCH0>UTC+13:00
</select><br>
<tr><th>Enable Daylight Saving <input type=checkbox name=D $sCS><br>
SNTP Server IP<input maxLength=15 size=15 name=IT0 value="$vIT"><br>
<input type=submit value="Save" name=r></form>

The URL is http://172.22.50.34/sntpcfg.htm?C=g&D=on&IT0=172.22.1.59&r=Save

Looking at this, every indication it should open option "g" and provide the enable checkbox, but it doesn't.  It correctly saves the parameters and shows the IP address.

I can live with this on a configuration screen, it's just curious that I thought it would update the chosen parameter





2
Hi Mark

On a main application, the SPI_FILE_SYSTEM  based on SPI_FLASH_W25Q128 devices (16MB)  seems to work perfectly as a USB MSD. 
(I needed to commented out   // #define ACTIVE_FILE_SYSTEM    which appeared to mess with my FAT32 format)
Reading and writing files and dragging folders to the DISK seems to be fully operational. 

I've had the serial loader with the SDCARD working, but flash chips are a whole lot better solution for me.
It's time for me to tackle the problem with the serial loader.  First, just treating it as a USB MSD doesn't seem to work.  with the  #defines set like this, it seems to lockup. 

loader.h
#define UTASKER_APP_START     (36 * 1024)
#define UTASKER_APP_END           (unsigned char *)(UTASKER_APP_START + (476 * 1024))
#define _UTASKER_APP_START_   (UTASKER_APP_START + (ROOT_FILE_ENTRIES * 32))

config.h of serial loader
    #define USB_INTERFACE                                                // enable USB driver interface
#define USB_MSD_DEVICE_LOADER                                 // USB-MSD device mode (the board appears as a hard-drive to the host)
   
#define USB_DEVICE_SUPPORT             
#define USB_MSD_TIMEOUT       
#define SPI_FLASH_FAT                                                // SPI flash
#define SIMPLE_FLASH                                             // don't perform block management and wear-leveling
#define FLASH_FAT_MANAGEMENT_ADDRESS     (SIZE_OF_FLASH)
#define DELETE_SDCARD_FILE_AFTER_UPDATE   

#define UTFAT_WRITE
#define UTFAT_LFN_READ                                               // enable long file name read support
#define STR_EQUIV_ON                                                 // ensure that this routine is available
#define UTFAT_LFN_WRITE
#define UTFAT_LFN_WRITE_PATCH
#define RANDOM_NUMBER_GENERATOR
#define UTFAT_RETURN_FILE_CREATION_TIME   

Nothing works, it locks up, but  creates a USB_MSD

UPLOAD_DISK(F:)  1.31 MB free of 1.32MB 

This is incorrect because the flash chip is fully formatted with a folder f:\web and it's lone file when I run the application code.

I think the problem is it's not correctly configured for what it is. 

I have it configured with #define USB_MSD_DEVICE_LOADER
however I don't think this is the proper way for it to be implemented for my use-case.

For the initial programming of a new board, the serial loader should fail with this:  #define _DISPLAY_SD_CARD_NOT_PRESENT() fnDebugMsg("SD-Card not present\r\n")
Jump to the main application, and then the main application has a initialization with formats the new device...and all is well.

I'm confused as to how exactly I configure SPI_FLASH as a MSD for the serial loader?  Is it an "SD Card" or USB Device? 
It seems to to walk the line and be a little bit of both?
I noticed I can't just use USB_MSD and SDCARD_SUPPORT

FYI - when I have a properly formatted W25QXXX.ini  the UART3.txt indicates
> SD-Card presentAndFormatted
No Application

I'd like it to act like a SDCARD and the USB doesn't need to do anything until it jumps to the main application.
Debug is fine with just the UART


Oh, some other details are the linker edits, although I feel I have them correctly setup.

and my K_512_128_BM.ld uses:
MEMORY
{
    FLASH (rx) : ORIGIN = 0x00009080, LENGTH = 0x00080000-0x9080         /* 512k Flash - boot loader */
    SRAM (wx)  : ORIGIN = 0x1fff01f0, LENGTH = 0x00020000-0x1f0          /* 128k RAM with vector size 0x1f0 (488 bytes - maximum for all processors) */
}

SECTIONS
{
  __SRAM_segment_start__   = 0x1fff01f0;
  __SRAM_segment_end__     = 0x2000ffff;
  __Vector_segment_start__ = 0x00009080;                                 /* application start address */
  __Vector_segment_end__   = 0x0000908f;
  __FLASH_segment_start__  = 0x00009090;
  __FLASH_segment_end__    = 0x0007ffff;
Thanks
Ray

3
Hi Mark,
I really thought I had the SNMP traps working, but somehow It is again failing.  To troubleshoot, I temporarily added 7 MIB spots for the ARP table as a debug because CLI isn't available.  On the included wireshark filtered capture  the first entry is ARP to the SNMP manager, and my 2 test traps flow freely   .  then appx 75 seconds in it appears to be an ARP refresh?
then traps are locked out   then 5 minutes later a gateway ARP refresh? then 5 minutes later traps begin for a short time, then ARP blocking again.  Eventually the system locks up with this - but my Modbus polling is good and SNMP GET communication is unaffected?   Just traps.

Since this is very odd behavior, I'm guessing that my method for sending traps is the problem. 
However, my ARP table is full of unwanted entries despite having ARP_IGNORE_FOREIGN_ENTRIES defined.



so I think I've got 2 questions:
1)  Is the ARP_IGNORE_FOREIGN_ENTRIES  supposed to ignore all random ARP requests on the network?  It doesn't appear to do this based on the ipaddresses in the ARP table

2)  Do SNMP traps need to be implemented in a specific way so that they get an ARP notification?  do they need to be called within the snmp void fnSNMP(TTASKTABLE *ptrTaskTable)??


Thanks
Ray




in my MIB handler, the extern unsigned char fnInitialiseSNMP(void)  ( called in Application.c - in my fnPIT_timerTask  every 5 seconds)

        if (ulCount_5000ms) --ulCount_5000ms;
        else
        {
          ulCount_5000ms = 500;
          if (SnmpStarted == 0)
          {
           if( fnInitialiseSNMP() == 1) SnmpStarted = 1;
          }
          else
          {
            if (SendColdStartTrap == 0)
            {
                fnSendSNMPTrap(SNMP_COLDSTART, 0, 1);//ALL_SNMP_MANAGERS);
                SendColdStartTrap = 1; 
            }
            else// cold start has been sent
            {
              fnSendSNMPTrap(SNMP_COLDSTART, 0, 1);//  test with just the easy to send trap
            }
          }


4
Hi Mark,
As you know I have had moderate success interfacing a DP83848 phy into a uTasker ethernet based application despite the MDIO being inoperative.
As I debug this in the simulator, I can see when kinetis_ENET.h is called to initialize code, but I actually can't find where #include "../../Hardware/Kinetis/kinetis_ENET.h"  is added, so no preprocessor appear to be invoked from the settings in app_hw_kinetis.h, and all variables are flagged as error by the MSVC intellicode. 

If I add like this in the app_hw_kinetis.h
#include "../../Hardware/Kinetis/kinetis.h"                              // include the Kinetis processor header at this location
#include "../../Hardware/Kinetis/kinetis_ENET.h"                       // include the Kinetis processor header at this location

My preprocessor defines correctly highlight with intellicode, but I get hundreds of compiler errors.

Can you tell me where the kinetis_ENET.h is supposed to be #included?

Thanks
Ray


Pages: [1]