Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
Hi

The selections are in the file app_hw_xxxx.h since it is specific to the HW.
Assuming you are working with an i.MX RT the default tends to be

            #define SDCARD_DETECT_INPUT_INTERRUPT                        // use card detect interrupt rather than polling the card
            #define SDCARD_DETECTION()      ((SDHC_PRSSTAT & SDHC_PRSSTAT_CINST) != 0) // card detection input


and if SDHC_DETECT_INTERRUPT_GPIO is enabled a GPIO can be used instead.

but it can be polled (via GPIO) with

#define SDCARD_DETECT_INPUT_POLL                                 // use card detect switch for detection polling (use together with T_CHECK_CARD_REMOVAL)

or polled by reading an SD card register if neither is enabled.

There is no specific VSEL control for the i.MX RT but if needed it can be added to the POWER_TO_SD_CARD() macro via a GPIO.

Regards

Mark


P.S: Note that the i.MX RT project has only used the SDHC's dedicated card detection line and so I found that I needed to adjust some conditional defines in the mass storage code so that the GPIO interrupt initialisation was included (for example). I have checked these changes in but not tested on HW (only in simulator). I used this on an RT 1020:

            #define SDCARD_DETECT_INPUT_INTERRUPT                        // use card detect interrupt rather than polling the card
            #define SDHC_DETECT_INTERRUPT_GPIO                           // use general GPIO rather than the SDHC's detect input
            #if defined SDHC_DETECT_INTERRUPT_GPIO
                #define SDCARD_DETECT_PORT     PORT2
                #define SDCARD_DETECT_PIN      PIN_GPIO_EMC_00_GPIO2_IO00
                #define PRIORITY_SDCARD_DETECT_PORT_INT     PRIORITY_PORT_2_LOW
                #define SDCARD_DETECTION()      (_READ_PORT_MASK(2, SDCARD_DETECT_PIN) == 0) // card detection input




42
Is there a section in the config file to set alternate pins for these SDCARD functions?

I didn't see any way to select an arbitrary GPIO pin for card detect (as can be done in the MCUXpresso SDK).  I did manually change the PWREN pin, and I haven't found the VSELECT pin setting yet.

JK
43
NXPTM M522XX, KINETIS and i.MX RT / Re: UDP socket buffer size
« Last post by mark on November 10, 2023, 11:19:52 PM »
Hi Neil

As long as the Ethernet Rx buffer can hold the UDP reception it will be adequate - your receive the UDP packet directly in that buffer:

#define LAN_BUFFER_SIZE        1518

is adequate for the largest Ethernet frame (excluding jumbo frames) and so UDP payload (over IPv4) is limited to 1492 bytes (I believe) - this assumes no fragmentation, which will be the case in modern local networks.

Regards

Mark
44
NXPTM M522XX, KINETIS and i.MX RT / UDP socket buffer size
« Last post by neil on November 10, 2023, 02:56:45 PM »
Hi Mark
  Hope you are keeping well...

Where do I find max buffer size of a received UDP packet?  My application can transmit 1k of data and want to make sure the buffer is large enough to hold this

Best Regards
Neil
45
µTasker general / Re: FRDM-K64F FTP
« Last post by mark on October 25, 2023, 09:09:10 PM »
Hi

The bat file that does this just needs to be double clicked and therefore it is not possible to do anything wrong with the action itself.

However you may have a firewall issue that is allowing the FTP command connection to be established but not the FTP data connection.
Try recording the Ethernet activity with wireshark to see what actually happens and also try temporarily disabling and firewall that you have.

Regards

Mark
46
µTasker general / FRDM-K64F FTP
« Last post by carlos789 on October 25, 2023, 03:03:20 PM »
Hello:
I am using the uTaskerV1.4.8_FRDM-K64F_LAN.bin binary on a FRDM-K64F board, I want to load the web pages using an FTP connection with copy_all.bat, I get the following message:

conectado a 192.168.0.3 .
 
220 Welcome KINECTIS FTP.

And the HTM file transfers are never displayed.
What am I doing wrong?
I would appreciate if you can guide me with the solution.
Thank you very much and greetings
carlos789
47
µTasker general / Re: HTML parameters update, however browser controls don't indicate
« Last post by Ray on October 04, 2023, 10:03:01 PM »
Hi Mark,
Yes, I definitely have a general lack of HTML skills, but luckily the online live html editors work really well.

1) I was not properly using   IS_CHECKED, IS_SELECTED, NOT_SELECTED, nor IS_DISABLED  correctly, I think I've got that working.
2) I needed to separate the selection variables on the two controls fnIsSelected *ptrBuffer.  using case "$sCS": for the DST checkbox, and repurposed "$sB_" for the list box
3) commented out all unused options to prevent unintended consequences

I believe it is working correctly, I'll test more over the next few days

I didn't see how to "store" the result of the variable sent to fnHandleWeb()  for the drop down box here:
/sntpcfg.htm?C=g&D=CS&IT0=172.22.1.59&r=Save
I took 'g' and stored it in a local unsigned char variable to use in the fnIsSelected()

unsigned char ListChoice = 0;
static unsigned char fnIsSelected(unsigned char *ptrBuffer)
{
    // Format $sAB (length assumed to be 4 bytes, even when both parameters are not used)
    //
    unsigned char ucCheck = NOT_SELECTED;

    switch (*ptrBuffer++) {
    case 'C':               //  Custom codes
      switch (*ptrBuffer) {
        case 'S':           //  DST checkbox
          if((temp_pars->temp_parameters.ucTimeZoneFlags&0x80)>0) return IS_CHECKED;
          else return NOT_SELECTED;
        default:
          return IS_DISABLED;
      }
    case 'B':               //  Custom codes for time zone choice
      if(ListChoice == *ptrBuffer) return IS_SELECTED;
      else  return NOT_SELECTED;
..
..
..


static int fnHandleWeb(unsigned char ucType, CHAR *ptrData, HTTP *http_session)
{
    static unsigned char  NewTimezoneData = 0;
    unsigned char        *ucPtr;

    switch (ucType) {

    case 'C':                        /// RJS   Variable found "C="_
      switch (*++ptrData) {         // preincrement past '='  need to switch a..z..A..H to capture all 34
      case 'a':
        ListChoice = *ptrData;
        NewTimezoneData = 0; // set the timezone to 'a'
        break;


Thank You!   Everything seems to be running smoothly now.
48
µTasker general / Re: HTML parameters update, however browser controls don't indicate
« Last post by mark on October 03, 2023, 11:43:12 PM »
Hi Ray

Check the user function:

static unsigned char fnIsSelected(unsigned char *ptrBuffer)

This should handle the decision as to whether the particular entry is selected or not but I don't think it is handling the 'C' case.

Try adding something like

case 'C':
if (*ptrBuffer == 'S') { // daylight saving case
    if (the box should be checked) {
        return IS_CHECKED;
    }
}
else if (*ptrBuffer matches the one that is presently selected) { // time zone case assumed
        return IS_SELECTED;                                              // select the entry
}
break;


Regards

Mark
49
µTasker general / HTML parameters update, however browser controls don't indicate
« Last post by Ray on October 03, 2023, 10:50:18 PM »
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




50
µTasker general / Re: How to configure SPI_FILE_SYSTEM to work with serial loader
« Last post by mark on September 18, 2023, 12:33:51 PM »
Hi Ray

>> #define ACTIVE_FILE_SYSTEM

This is used to enable the uFileSystem which tends to be used with the FTP/HTTP interfaces. However when no Ethernet is enable in the serial loader

#define _NO_FILE_INTERFACE                                           // code size optimisation

is set, which disables some of the support so that the size is optimised.



>> change line 217  from 64 to 476  #define UTASKER_APP_END   (unsigned char *)(UTASKER_APP_START + (476 * 1024)) // use entire chip

You may need to reduce the size by the application's parameter system size so that the parameters are not deleted when loading new code.

Otherwise I haven't been able to reproduce the project so it would be simpler if you send me your config.h and app_hw_kinetis.h files.

If I have understood correctly you are using USE_USB_MSD in the application (a USB-MSD device to SD card / SPI Flash), with the following configuration note:
            #define USE_USB_MSD                                          // needs SD card to compile (or alternatives FLASH_FAT / SPI_FLASH_FAT / FAT_EMULATION)

In the serial loader the same can be set but it looks to be dedicated to the SD card:
#define USE_USB_MSD                                              // full USB-MSD to SD card interface on USB (no emulated loader function) - requires SDCARD_SUPPORT (USB_MSD_DEVICE_LOADER can be disabled)

My initial feeling is that some addition code configuration may be required to allow the same operation.

If you send me the two header files it would be easier for me to check.

Regards

Mark


Pages: 1 ... 3 4 [5] 6 7 ... 10