cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-WLC38RX transmit data to STEVAL-WBC2TX50

JMin.17
Associate II

Hi, it seems that the STEVAL-WLC38RX uses STSW-WPSTUDIO and the STEVAL-WBC2TX50 uses STEVAL-WBC2TX50. Is it possible to program the STEVAL-WLC38RX to take external ADC measurements via the NTC pin or the GPIOs and send it to the STEVAL-WBC2TX50 using the studios?

Please provide some guidance. 

Thanks!

3 REPLIES 3
willzhou
ST Employee

Hi Min


STEVAL-WBC2TX50 uses STSW-WBC2STUDIO tools.


I do not understand your request, do you mean send RX NTC data to TX/STWBC2, use ASK packet?
If yes, we can do it, please follow bidi-communication AN. 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi,

Thanks for the prompt response. Yes, I meant that I want to send send RX NTC data to TX/STWBC2. However I am curious if:

1) The STWLC38 can be programmed to autonomously measure and send RX NTC to TX/STWBC2 data at a fixed interval?

2) If the STWBC2 can respond back to the STWLC38 with a proprietary packet to wirelessly control a GPIO of the STWLC38. (So whether the STWLC38 can be programmed to toggle a GPIO when the STWBC2 sends a certain signal)?

3) If both of the above are possible, what parts are programmable from the STSW-XXXSTUDIO tools and which parts would require an external microcontroller for control?

Basically, I kind of want to see if the STWLC38 can be used kind of like a battery-free wireless sensor, and if the STWBC2 can power it and receive/record the NTC/ADC data and send some command to toggle the STWLC38 GPIO.

HI Min

Does Proposal 2 and 3 same?
1.You need use MCU to control WLC38, here is python script, please check "Python_FT260_ST_WLC.7z wlc38 parts

Wireless Charging solution Wiki - STMicroelectronics Community

2.Mcu need to read ntc data and use ASK PP packet and send to TX. If TX reply ACK or NACK, rx will get interrupt flag, and MCU can control gpio toggle.

 

def wlc38_bidi_communication(send_buff = [0x19,0x38]):
  wlc38.write16(I2CREG_RX_INTR_CLR,[0xFF,0xFF,0xFF,0xFF])#clear intr
  wlc38.write16(I2CREG_RCVD_MSG,[0]*8)#clear read buff
  wlc38.write16(I2CREG_SEND_MSG,send_buff)
  wlc38.write16(I2CREG_RX_CMD,(1<<BIT_RX_SEND_MSG_WAIT_REPLY))
  time.sleep(1)
  print("read int and read buff")
  tx_reply_data = wlc38.wread16(I2CREG_RCVD_MSG,8)#0X0190
  print("tx_reply_data: ", ' '.join( ['0x{:02X}'.format(x) for x in tx_reply_data]) )
  intr_latch = wlc38.wread16(I2CREG_RX_INTR_LATCH,4)#read int status
  if(intr_latch[0] & (1<<BIT_RX_RCVD_MSG_INTR_LATCH) == (1<<BIT_RX_RCVD_MSG_INTR_LATCH)):
        print("BIT_RX_RCVD_MSG_INTR_LATCH")
  wlc38.write16(I2CREG_RX_INTR_CLR,[0xFF,0xFF,0xFF,0xFF])#clear intr

def wlc38_send_ntc():
    ntc = wlc38.wread16(I2CREG_RX_NTC,2)#0x009C
    if(ntc < 32768:(
        ntc = (ntc*3600/16384)+1800
    else:
        ntc = 1800-((65536-ntc)*3600/16384)
    wlc38_bidi_communication([0x58,0x1F,ntc<<8,ntc&0xFF,0x00,0x00])
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.