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.


Messages - Kiger

Pages: [1]
1
MODBUS / Re: conflicted define in modbus.c
« on: June 01, 2017, 10:54:23 PM »
@mark,

Yes , I use the modbus package version 1.23 .
Where can I got the  newest version?

Best Regards,
Kiger

2
MODBUS / conflicted define in modbus.c
« on: June 01, 2017, 08:45:49 AM »
Dear Mark @mark,

The  AUTO_RS485_RTS_SUPPORT define   was conflicted.

in line 910#  of modbus.c

        #if !defined AUTO_RS485_RTS_SUPPORT && (!defined _LPC23XX && !defined _LPC17XX) // {V1.19}
        fnConfigRTS_delay(ucMODBUSport, &tInterfaceParameters);
        #endif

the function "fnConfigRTS_delay" was invoked when AUTO_RS485_RTS_SUPPORT undefined.

But in line 358#  1687# the function was declared and implemented when the "AUTO_RS485_RTS_SUPPORT " was defined.

line 358#
    #if defined MODBUS_RS485_RTS_SUPPORT
    static void fnConfigRTS_delay(unsigned char ucMODBUSport, TTYTABLE *InterfaceParameters);
    #endif




3
MODBUS / Modbus over rs485 for keaz128 many undefined reference
« on: June 01, 2017, 04:26:24 AM »
Dear Mark   @Mark

If  active the   define  MODBUS_RS485_SUPPORT , there are many undefined references.

Do I need implement  all the function by myself?

Hardware: FRDM_KEAZ128Q80
IDE: codewarrior 10.7

linker output:

Description   Resource   Path   Location   Type
mingw32-make: *** [uTaskerV1_4.elf] Error 1   uTasker-Kinetis-master          C/C++ Problem
implicit declaration of function '_CONFIGURE_RTS_0_HIGH' [-Wimplicit-function-declaration]   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1403   C/C++ Problem
implicit declaration of function 'fnConfigRTS_delay' [-Wimplicit-function-declaration]   MODBUS.c   /uTasker-Kinetis-master/uTasker/MODBUS   line 910   C/C++ Problem
undefined reference to `_SET_RTS_0_HIGH'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1638   C/C++ Problem
undefined reference to `fnConfigRTS_delay'   MODBUS.c   /uTasker-Kinetis-master/uTasker/MODBUS   line 910   C/C++ Problem
undefined reference to `_SET_RTS_1_HIGH'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1642   C/C++ Problem
undefined reference to `_SET_RTS_1_LOW'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1610   C/C++ Problem
'ucNexttestPort' defined but not used [-Wunused-variable]   modbus_app.c   /uTasker-Kinetis-master/Applications/uTaskerV1.4   line 469   C/C++ Problem
undefined reference to `_SET_RTS_2_HIGH'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1647   C/C++ Problem
undefined reference to `_SET_RTS_2_LOW'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1615   C/C++ Problem
undefined reference to `_SET_RTS_0_LOW'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1606   C/C++ Problem
undefined reference to `_CONFIGURE_RTS_2_HIGH'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1451   C/C++ Problem
undefined reference to `_CONFIGURE_RTS_2_LOW'   kinetis_UART.h   /uTasker-Kinetis-master/Hardware/Kinetis   line 1455   C/C++ Problem

4
Find out  that the   GPIOC_PIDR   define  is missed in file kinetis.h , which is used for PORT I  in the Q80 package.

5
MODBUS / MODBUS UART pin configure
« on: May 31, 2017, 09:12:15 AM »
@mark
Dear Mark,
Now I am trying run the uTasker on my customized board with KEAZ128(80PIN).

One modbus slave run on UART0 (on port A) with RS485, and the DEMO_UART on UART2(on port I).

There are few questions about MODBUS and UART .

1. Where to define the GPIO pin  to work as RTS control  when use RS485?

2. How to define UART pin ? The UART2 was used on port I bit0/bit1.
    Read through uTasker_MODBUS.PDF and uTaskerUART.PDF  ,find out that should use macro UARTx_ON_X to define
the UART pin .
     But the macro UART2_ON_I  can't be found . 
    Read the code ,found that  the UART2 was hard code to  port D .
    In file  "kinetis_uart.h" line 1906 :

        case 2:                                                              // configure the UART Tx 2 pin
            #if defined KINETIS_KE
        _CONFIG_PERIPHERAL(D, 7, (PD_7_UART2_TX | UART_PULL_UPS));       // UART2_TX on PD7 (alt. function 2)

      What's more ,the macro _CONFIG_PERIPHERAL was defined to dummy.
     Do I need manually change the code to configure the UART2 on PORT I?


By the way , there is  one  FRDM-KL27Z and one  FRDM_KEAZ128Q80 board in my hand.  I can try first on that boards.
Could you thrown a simple demo  to run a modbus slave    with RS485, and the DEMO_UART on UART2(on port I).

Best Regards,
Kiger Zhang

Pages: [1]