This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220MODA: Use of SFlash memory of 1Mbit as a EEPROM by inbuilt application MCU of CC3220MODA

Part Number: CC3220MODA
Other Parts Discussed in Thread: CC3120MOD, CC3220MOD, BOOSTXL-CC3120MOD, CC3120, CC3135, UNIFLASH

Hi,

1) Can we use SFlash memory of 1Mbit as a EEPROM by inbuilt application MCU cortex M4 of CC3220MODA?

2) Whats the purpose of this SFlash in CC3120MOD wifi module in which we do not have application MCU inbuilt in module.

3) As per datasheet looks CC3120MOD and CC3220MODA is pin to pin compatible. Is it ture? 

Regards,

Mahendra Rana

  • Hi,

    Answers to your questions.

    1) No. Internal XIP flash is intended as execution flash. Even it is possible write user data into XIP flash, it is not recommended, because XIP flash may to be erased by ROM bootloader. It is recommanded to save user data into sFlash by sl_ filesystem API or use additional storage like a SD card or small EEPROM chip.

    2) Storage for NWP (ServicePack, temporary wiles, user files, web files)

    3) CC3120MOD and CC3220MOD are different type of device. From this reason it make sense to talk about pin-to-pin compatibility.

    btw ... XIP flash have size 1MByte not a 1MBit

    Jan

  • Hi, Jan

    Ok thanks!

    Can you please reply on below query as well: -

    Is it in AP mode we need to set gateway ip same as device ip

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/907758

  • Hi,

    I don't know exact answer. But I think there i no change at that behaviour of AP mode. If does not fit to your purpose how DHCP server works at AP mode, nothink prevent you to use own DHCP server (own DHCP server implementation is not that hard).

    Jan

  • Hi,

    1) Ok but is any other way to route internet packet not through device gateway. As right now I am not able to use my mobile internet while connected with CC3120MOD in AP mode..

    2) And is it CC3220MODA having pcb antenna so will get less distance range as compare to CC3120MOD not having antenna so we are using chip antenna?

    Regards,

    Mahendra Rana

  • Hi,

    1. As I said I don't know exact answer. Please wait for a answer from TI engineer.

    2. This depends on if your antenna circuit will be properly optimised. If is than you can expect better performance with modules without antenna (CC3220MOD or CC3120MOD). But be aware that you need properly tune antenna not only to your PCB also for your cover and expected usage. For example even plastic case can load your antenna and degrade performance of your antenna circuits. Please see this video.

    Jan

  • Hi Jan,

    If we will compare with TI designed development board then is it we will get long distance range by BOOSTXL-CC3120MOD board in which chip antenna was used with respect to pcb antenna used in development board of CC3220MODA "LAUNCHCC3220MODASF"?

    Regards,

    Mahendra Rana

  • Hi Jan,

    Waiting for your reply on above query.

    Regards,

    Mahendra

  • Hi Mahendra,

    Generally you should get similar range for  BOOSTXL-CC3120MOD and LAUNCHCC3220MODASF. It can be there some variance. What RSSI values do you read from CC32xx/CC31xx device and your access point?

    Some values about measurement you can get from certification reports.

    Jan

  • Hi Jan,

    Thanks for your reply!

    1) How I can check RSSI value in mobile while connected with CC31XX/CC32XX device in AP mode ? And how I can check RSSI value in CC3120?

    2) As currently we are using CC3120MOD so I am exploring to replace it with CC3220MODASM which is having inbuilt antenna and cortex M4 application MCU but this CC3220MODASM having 256KB RAM/Flash memory so How we can configure same 256KB of RAM into flash memory and RAM both?

    Regards,

    Mahendra Rana

  • Hi,

    1) It is better to measure RSSI value in STA mode. It is your main usage of CC3120 device in AP mode?

    • If you want to measure RSSI at your infrastructure access point you need device with such capability. For example you can use access point/router with OpenWRT and use iw command.
    • It you want to use your mobile device for RSSI measurement, you need to use proper application. For example at Google Play you find many applications with such capability (e.g. Wifi analyser).
    • RSSI value you can read by code below. Do not call that code at lower interval then 5sec. In case of CC3120/CC3220 is in AP mode be aware that only one client can be connected to get proper RSSI value.
    SlWlanGetRxStatResponse_t rssiRxStat;
    int rssiVal;
    
    if (sl_WlanRxStatGet(&rssiRxStat, 0) == 0) {
      if (rssiRxStat.AvarageMgMntRssi != 0) {
        rssiVal = rssiRxStat.AvarageMgMntRssi;
      }
    } else {
      // error
      rssiVal = -99;
    }

    2) Sorry, but I don't understand your question. Personally I don't see any benefit of replacing of CC3120MOD by CC3220MOD. Replacement to 3rd generation devices (CC3235 or CC3135) makes me much more sense.

    As to be honest I am a little bit scared. You said that you are using CC3120MOD but you asking such basing questions like how to measure RSSI. This question you should have already solved with your CC3120MOD design.

    Jan

  • Hi Jan,

    1) Yeah my question for RSSI is very basic but I asked because about this api "sl_WlanRxStatGet" nothing mentioned in detail in programming guide manual. And also my question was -

    if I will check rssi value in AP mode then it gives statistics of my wifi device or it gives rssi value of connected client in dbm? Similarly in station mode if I will check statistics then it gives rssi value of my device i.e. station or a router by which station connected?

    2) Methods of updating service pack in CC3120MOD: -

    a) Is it I can update service pack by my host controller firmware only means I will keep latest service pack image in my host firmware only and after initialization in my code I will read service pack and their I will check if service pack version is less than desired service pack version then I will update service pack by my host firmware only. I have doubt that is it possible or not. My host controller flash having only 128 KB so if service pack firmware image will take only 10-15 KB size then its good I will add service pack image in my host firmware only. Rather then I will update service pack in production by XXEMUBOOST board by uniflash tool.

    Whats your comment on this? 

    b) Is it I can program service pack by host spi pins not by uart pins. So I will receive command and firmware image by uniflash on uart of my host controller and then received bytes on uart of host controller I will transfer it to host spi pins of CC3120MOD by that I can update its service pack easily.

    c) or both above update method will not work and I can only program through SFLASH SPI pins or uart pins by BOOST development board?

    waiting for your reply!

    Regards,

    Mahendra Rana 

  • Hi,

    1) In case you read RSSI from CC3120 you will get RSSI values from CC3120 device side. If you need RSSI value from other side you need to read RSSI values from that side (e.g. from access point/router, cell-phone).

    2)

    a) Current version (3.15.0.1) of CC3220/CC3120 service pack is ~90kB. If you select MCU with bigger flash, you can use this way.

    b) You can prepare image for CC3120 by Uniflash and this image you can program by sl_ API from your host. How you will transfer this image into your host is up to you.

    Jan

  • ok thanks Jan!

  • Hi Jan,

    1) Can you please guide me how I can program image by sl_API from my host mcu? By which API I can program.

    2) I am unable to find in programming guide. I have gone through "Embedded Programming" document SWPA230A–May 2017 but it described programming through UART only and my HOST MCU and WiFi module CC3120MOD connected through SPI.

    3) Is it some example code is available, can you please share?

    Please reply as soon as possible..

    Regards,

    Mahendra Rana

  • Hi,

    1) Please see host driver description and sl_FsProgram() API.

    2) as point 1

    3) Example is available at host driver description.

    Jan

  • Hi Jan,

    Thanks for your reply!

    Still having confusions: -

    1) So In my case my host mcu connected with host spi not with SPI flash pins of CC3120MOD, I will receive directly data from UART of my host mcu and I will pass that data in sl_FSProgram() API?

    2) And this sl_FSProgram() api will transfer data through SPI to CC3120MOD and no response I have to send back to Uniflash on UART?

    3) Only I have to receive data on UART by uniflash tool and that I have to pass in sl_FSProgram() API and Once this finish I have to just reset device by sl_stop and sl_start. By this method I am able to update service pack of CC3120MOD, Is it I am right?

    3) How reset/hibernate pin I have to handle during this flashing service pack in CC3120MOD? or don't require it will be handle by commands of Uniflash through sl_FSProgram API?

    4) Is it this Uniflash will be a command based synchronous/acknowledged based communication for updating service pack via host mcu?  

    5) Is it I have to receive single bytes on UART and pass it to sl_FSProgram() API or no it will be in chunk size?

    6) I am unable to find example code in host driver description. I found only examples of OTA in that folder so can you please share location of example in host driver folder or function by which I can directly program service pack, if possible.

    7) Can you please guide me how complete function will work in my case as my Host mcu connected by UART to Uniflash and then host mcu-cc3120mod through HOST SPI pins.

    Regards,

    Mahendra Rana

  • Hi,

    1) Yes, this is possible.

    2) No. You will prepare image by Uniflash software (Uniflash will create file with binary data). And this file you somehow transfer into your MCU (e.g. terminal software, your own software, etc.).

    3) No. See point 2) Image created by Uniflash can contain service pack, default configuration, your user files, html files for webserver...

    3) See 2)

    4) See 2)

    5) See 2)

    6) You find example at Doxigen page with description of  sl_FSProgram() API.

    7) See 2)

    Jan